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 ace751665a243d58ae59f40f807f1df087662feb..55c68535bfa9173a035fff4909d456672b59206b 100644 |
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
@@ -357,7 +357,7 @@ void FrameLoader::replaceDocumentWhileExecutingJavaScriptURL(const String& sourc |
// frame on a detached DOM tree, which is bad. |
SubframeLoadingDisabler disabler(m_frame->document()); |
m_frame->detachChildren(); |
- m_frame->document()->detachLayoutTree(); |
+ m_frame->document()->shutdown(); |
clear(); |
// detachChildren() potentially detaches the frame from the document. The |
@@ -1131,7 +1131,7 @@ bool FrameLoader::prepareForCommit() |
// No more events will be dispatched so detach the Document. |
// TODO(yoav): Should we also be nullifying domWindow's document (or domWindow) since the doc is now detached? |
if (m_frame->document()) |
- m_frame->document()->detachLayoutTree(); |
+ m_frame->document()->shutdown(); |
m_documentLoader = m_provisionalDocumentLoader.release(); |
takeObjectSnapshot(); |