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

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

Issue 1659013003: Don't reset LoadEventProgress if frame unload has already started. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit test and adjust comments. Created 4 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
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 27cc4b93872c298865140447341d021f73a9bb7a..d0cf70621827a6b694e5ad0cf07c71f86e0df79d 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1042,6 +1042,10 @@ bool FrameLoader::prepareForCommit()
ThreadState::current()->schedulePageNavigationGCIfNeeded(ratio);
}
+ // Don't allow any new child frames to load in this frame: attaching a new
+ // child frame during or after detaching children results in an attached
+ // frame on a detached DOM tree, which is bad.
+ SubframeLoadingDisabler disabler(m_frame->document());
if (m_documentLoader) {
client()->dispatchWillClose();
dispatchUnloadEvent();

Powered by Google App Engine
This is Rietveld 408576698