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

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: rebase 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 1115a09eebaf013b338e8bf577c68c0ecf6c5e25..8c9fb0d931e68880b7fbc57cad647ae04aa4d157 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"
@@ -461,6 +462,14 @@ bool LocalFrame::shouldClose()
return m_loader.shouldClose();
}
+void LocalFrame::detachChildren()
+{
+ DCHECK(m_loader.stateMachine()->creatingInitialEmptyDocument() || document());
+
+ if (Document* document = this->document())
+ ChildFrameDisconnector(*document).disconnect();
+}
+
void LocalFrame::setDOMWindow(LocalDOMWindow* domWindow)
{
// Oilpan: setDOMWindow() cannot be used when finalizing. Which
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | third_party/WebKit/Source/core/frame/RemoteFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698