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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp

Issue 2751973005: Link prefetch fetches deferred until onload
Patch Set: Fixed post onload addition and crash Created 3 years, 9 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
Index: third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index 1d136fa3b24da4823a151f600c7b6db2183ead49..9336e34f6247caf2acd778d6ed72fb914dae3883 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -1479,11 +1479,13 @@ void LocalDOMWindow::dispatchLoadEvent() {
timing.markLoadEventEnd();
DCHECK(documentLoader->fetcher());
// If fetcher->countPreloads() is not empty here, it's full of link
- // preloads, as speculatove preloads were cleared at DCL.
+ // preloads, as speculative preloads were cleared at DCL.
if (frame() && documentLoader == frame()->loader().documentLoader() &&
- documentLoader->fetcher()->countPreloads())
+ documentLoader->fetcher()->countPreloads()) {
m_unusedPreloadsTimer.startOneShot(unusedPreloadTimeoutInSeconds,
BLINK_FROM_HERE);
+ }
+ documentLoader->fetcher()->loadOnloadDeferredResources();
} else {
dispatchEvent(loadEvent, document());
}

Powered by Google App Engine
This is Rietveld 408576698