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

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2174263002: Defer loads in new pages/frames if ScopedPageLoadDeferral is active (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify Created 4 years, 5 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/loader/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index f1aff24f70f0195ec8f20ae6326178d8892c8647..71c83104e397736e7214f911b59faa32001ca352 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -204,6 +204,11 @@ void FrameLoader::init()
m_provisionalDocumentLoader->startLoadingMainResource();
m_frame->document()->cancelParsing();
m_stateMachine.advanceTo(FrameLoaderStateMachine::DisplayingInitialEmptyDocument);
+ // Self-suspend if created in an already deferred Page. Note that both
+ // startLoadingMainResource() and cancelParsing() may have already detached
+ // the frame, since they both fire JS events.
+ if (m_frame->page() && m_frame->page()->defersLoading())
Nate Chapin 2016/07/27 17:30:47 This makes me saddest of all :(
dcheng 2016/07/28 01:23:28 Yes... I would have to completely agree =(
+ setDefersLoading(true);
takeObjectSnapshot();
}

Powered by Google App Engine
This is Rietveld 408576698