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

Unified Diff: third_party/WebKit/Source/core/frame/LocalFrame.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/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 9d4064262a3aae427d5fd76f81870857786f393a..a21ee55cefeae63b41c8150b868fae84149c5f24 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -320,6 +320,10 @@ void LocalFrame::detach(FrameDetachType type)
// detached, so protect a reference to it.
RefPtrWillBeRawPtr<LocalFrame> protect(this);
m_loader.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(*document());
m_loader.dispatchUnloadEvent();
detachChildren();
m_frameScheduler.clear();

Powered by Google App Engine
This is Rietveld 408576698