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

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

Issue 2605173002: Call checkCompleted() synchronously in HTMLStyleElement::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/HTMLStyleElement.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/HTMLStyleElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
index 8b7d3d5e3425bd9e2d031572dd665ad0d613bdb9..367d84326e7789f54b251372d8d1157dbbc8d91d 100644
--- a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
@@ -106,9 +106,13 @@ const AtomicString& HTMLStyleElement::type() const {
}
void HTMLStyleElement::dispatchPendingEvent(
- std::unique_ptr<IncrementLoadEventDelayCount>) {
+ std::unique_ptr<IncrementLoadEventDelayCount> count) {
dispatchEvent(Event::create(m_loadedSheet ? EventTypeNames::load
: EventTypeNames::error));
+
+ // Checks Document's load event synchronously here for performance.
+ // This is safe because dispatchPendingEvent() is called asynchronously.
+ count->clearAndCheckLoadEvent();
}
void HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources(
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLStyleElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698