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

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: One more disabler Created 4 years, 10 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..d9ff10255d983a431a82f8c790bd8bc9eefa8e78 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -329,6 +329,10 @@ void FrameLoader::replaceDocumentWhileExecutingJavaScriptURL(const String& sourc
init.withNewRegistrationContext();
stopAllLoaders();
+ // 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());
m_frame->detachChildren();
m_frame->document()->detach();
clear();
@@ -1042,6 +1046,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();
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFrameOwnerElement.h ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698