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

Unified Diff: Source/core/dom/Document.cpp

Issue 1058403002: Revert of Refactor frame navigation/detach state cleanup to be more sane. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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
« no previous file with comments | « Source/core/dom/ActiveDOMObjectTest.cpp ('k') | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 83fdf6f939b7ef19b529c1958ab6bf90a4be5069..6a4f0e2b59f2e4631bfc56e442dcc7cd3e0cbe94 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -2166,19 +2166,13 @@
void Document::prepareForDestruction()
{
- ASSERT(!m_frame || m_frame->tree().childCount() == 0);
-
+ m_markers->prepareForDestruction();
+ disconnectDescendantFrames();
+
+ // The process of disconnecting descendant frames could have already detached us.
if (!isActive())
return;
- ScriptForbiddenScope forbidScript;
- // We detach the FrameView's custom scroll bars as early as
- // possible to prevent detach() from messing with the view
- // such that its scroll bars won't be torn down.
- //
- // FIXME: We should revisit this.
- view()->prepareForDetach();
- m_markers->prepareForDestruction();
if (LocalDOMWindow* window = this->domWindow())
window->willDetachDocumentFromFrame();
detach();
« no previous file with comments | « Source/core/dom/ActiveDOMObjectTest.cpp ('k') | Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698