Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Unified Diff: third_party/WebKit/Source/core/html/HTMLLinkElement.cpp

Issue 2391923002: Call checkCompleted() synchronously in HTMLLinkElement::dispatchPendingEvent() (Closed)
Patch Set: Rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLinkElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
index d564e57e3482b3d804ab031337dd41c3daabbf14..786b9880de652ce818b39b7409f55f452f690b48 100644
--- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -280,12 +280,16 @@ void HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources(
}
void HTMLLinkElement::dispatchPendingEvent(
- std::unique_ptr<IncrementLoadEventDelayCount>) {
+ std::unique_ptr<IncrementLoadEventDelayCount> count) {
DCHECK(m_link);
if (m_link->hasLoaded())
linkLoaded();
else
linkLoadingErrored();
+
+ // Checks Document's load event synchronously here for performance.
+ // This is safe because dispatchPendingEvent() is called asynchronously.
+ count->clearAndCheckLoadEvent();
}
void HTMLLinkElement::scheduleEvent() {
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLinkElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698