Index: Source/core/frame/LocalDOMWindow.cpp |
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp |
index 0c636c0bd315c613ab58748e3a472d3563458a3d..54881b1d527f87c67ca1461935e292a2decccbb5 100644 |
--- a/Source/core/frame/LocalDOMWindow.cpp |
+++ b/Source/core/frame/LocalDOMWindow.cpp |
@@ -311,7 +311,15 @@ |
if (!m_document) |
return; |
- ASSERT(!m_document->isActive()); |
+ if (m_document->isActive()) { |
+ // FIXME: We don't call willRemove here. Why is that OK? |
+ // This detach() call is also mostly redundant. Most of the calls to |
+ // this function come via DocumentLoader::createWriterFor, which |
+ // always detaches the previous Document first. Only XSLTProcessor |
+ // depends on this detach() call, so it seems like there's some room |
+ // for cleanup. |
+ m_document->detach(); |
+ } |
// FIXME: This should be part of ActiveDOMObject shutdown |
clearEventQueue(); |