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

Unified Diff: Source/core/frame/DOMWindow.cpp

Issue 292503006: Oilpan: add [WillBeGarbageCollected] for Node. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Clear document touch event handlers upon losing DOMWindow. Created 6 years, 7 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/frame/DOMWindow.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+#endif
+
removeAllEventListeners();
haraken 2014/05/23 15:02:45 Instead of moving only didClearTouchEventHandlers(
sof 2014/05/23 15:30:31 Hmm, don't understand what you are suggesting :) T
#if ENABLE(OILPAN)
- ASSERT(m_document->isDisposed());
+ // FIXME: This should be part of ActiveDOM Object shutdown
haraken 2014/05/23 15:02:45 Nit: ActiveDOMObject
+ 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);
« no previous file with comments | « Source/core/frame/DOMWindow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698