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 |