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

Unified Diff: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp

Issue 2332963003: Unset CompositorWorkerGlobalScope during WorkerGlobalScope::dipose. (Closed)
Patch Set: Created 4 years, 3 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
Index: third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp
diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp
index 60cba6a5e183d457422072ffdbf0eb0d9f385087..5b27d95df1fdbc916dcfd7a32ada05b38eb3b842 100644
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp
@@ -49,6 +49,14 @@ const AtomicString& CompositorWorkerGlobalScope::interfaceName() const
return EventTargetNames::CompositorWorkerGlobalScope;
}
+void CompositorWorkerGlobalScope::removeAllEventListeners()
+{
+ // Note, we may still have callbacks in m_callbackCollection, but this
+ // ensures that we will no longer try to call them after this global
+ // scope has been disposed.
+ CompositorProxyClient::from(clients())->setGlobalScope(nullptr);
+}
+
void CompositorWorkerGlobalScope::postMessage(ExecutionContext* executionContext, PassRefPtr<SerializedScriptValue> message, const MessagePortArray& ports, ExceptionState& exceptionState)
{
// Disentangle the port in preparation for sending it to the remote context.

Powered by Google App Engine
This is Rietveld 408576698