Index: Source/core/frame/DOMWindow.cpp |
diff --git a/Source/core/frame/DOMWindow.cpp b/Source/core/frame/DOMWindow.cpp |
index 3b2c2b9012b322e5ed2606ea54dbd332fe7d9d8f..1ec3bbfaad6d2338ffce05c2574fe50dbc8f788e 100644 |
--- a/Source/core/frame/DOMWindow.cpp |
+++ b/Source/core/frame/DOMWindow.cpp |
@@ -489,15 +489,20 @@ DOMWindow::~DOMWindow() |
ASSERT(m_hasBeenReset); |
reset(); |
+#if ENABLE(OILPAN) |
+ // Stub out early to prevent Document access in removeAllEventListeners(). |
+ m_document = nullptr; |
haraken
2014/05/23 12:23:27
I'm not sure if it's OK to clear m_document here.
sof
2014/05/23 14:29:07
I think we can address that via DOMWindow::clearWe
|
+#endif |
+ |
removeAllEventListeners(); |
#if ENABLE(OILPAN) |
- ASSERT(m_document->isDisposed()); |
+ // FIXME: This should be part of ActiveDOM Object shutdown |
+ clearEventQueue(); |
#else |
ASSERT(m_document->isStopped()); |
-#endif |
- |
clearDocument(); |
+#endif |
} |
const AtomicString& DOMWindow::interfaceName() const |
@@ -1875,6 +1880,7 @@ PassOwnPtr<LifecycleNotifier<DOMWindow> > DOMWindow::createLifecycleNotifier() |
void DOMWindow::trace(Visitor* visitor) |
{ |
+ visitor->trace(m_document); |
visitor->trace(m_screen); |
visitor->trace(m_history); |
visitor->trace(m_locationbar); |