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

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

Issue 2134113002: Use ChildFrameDisconnector when detaching child frames of a LocalFrame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DCHECK 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/frame/LocalFrame.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
index 5477e36ce1ea3d8a125d719ce31674013aed88ad..b6947d2ca8fbb527ea8f5c87e1a42bfe68082b04 100644
--- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -31,6 +31,7 @@
#include "bindings/core/v8/ScriptController.h"
#include "core/InstrumentingAgents.h"
+#include "core/dom/ChildFrameDisconnector.h"
#include "core/dom/DocumentType.h"
#include "core/dom/StyleChangeReason.h"
#include "core/editing/EditingUtilities.h"
@@ -447,6 +448,14 @@ bool LocalFrame::shouldClose()
return m_loader.shouldClose();
}
+void LocalFrame::detachChildren()
+{
+ DCHECK(m_loader.stateMachine()->creatingInitialEmptyDocument() || document());
+
+ if (document())
esprehn 2016/07/13 02:35:45 if (Document* document = this->document()) avoids
dcheng 2016/07/13 02:51:34 Done.
+ ChildFrameDisconnector(*document()).disconnect();
+}
+
void LocalFrame::willDetachFrameHost()
{
LocalFrameLifecycleNotifier::notifyWillDetachFrameHost();

Powered by Google App Engine
This is Rietveld 408576698