| 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(
|
|
|