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