Index: Source/core/dom/Document.cpp |
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp |
index 646a36b53a65645d7d145b0ce1565c7bb7008fb3..e6cab2248606b0a0d930868d1cffa4b04fb504ba 100644 |
--- a/Source/core/dom/Document.cpp |
+++ b/Source/core/dom/Document.cpp |
@@ -2161,13 +2161,13 @@ void Document::detach(const AttachContext& context) |
void Document::prepareForDestruction() |
{ |
- m_markers->prepareForDestruction(); |
- disconnectDescendantFrames(); |
+ ASSERT(!m_frame || m_frame->tree().childCount() == 0); |
dcheng
2015/04/03 14:35:45
If we were active at some point, all children must
|
- // The process of disconnecting descendant frames could have already detached us. |
if (!isActive()) |
dcheng
2015/04/03 14:35:45
We still need to check this, due to the magic of n
Nate Chapin
2015/04/03 19:27:31
D:
|
return; |
+ m_markers->prepareForDestruction(); |
dcheng
2015/04/03 14:35:45
Moving this here seemed to be a no-op, and makes t
|
+ |
if (LocalDOMWindow* window = this->domWindow()) |
window->willDetachDocumentFromFrame(); |
detach(); |