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

Unified Diff: Source/core/workers/WorkerGlobalScope.cpp

Issue 194923007: Explicit notification and removal of lifecycle observers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Delay proxy notification Created 6 years, 9 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: Source/core/workers/WorkerGlobalScope.cpp
diff --git a/Source/core/workers/WorkerGlobalScope.cpp b/Source/core/workers/WorkerGlobalScope.cpp
index 1699766d3f6631ec4627747717212073bf0bc3d1..73954dfd50b373654a3c9aec9d5c844e845f84dc 100644
--- a/Source/core/workers/WorkerGlobalScope.cpp
+++ b/Source/core/workers/WorkerGlobalScope.cpp
@@ -93,9 +93,6 @@ WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W
WorkerGlobalScope::~WorkerGlobalScope()
{
-#if !ENABLE(OILPAN)
- dispose();
-#endif
}
void WorkerGlobalScope::applyContentSecurityPolicyFromString(const String& policy, ContentSecurityPolicyHeaderType contentSecurityPolicyType)
@@ -196,18 +193,12 @@ void WorkerGlobalScope::dispose()
{
ASSERT(thread()->isCurrentThread());
- // Notify proxy that we are going away. This can free the WorkerThread object, so do not access it after this.
- thread()->workerReportingProxy().workerGlobalScopeDestroyed();
-
clearScript();
clearInspector();
setClient(0);
- // The thread reference isn't currently cleared, as the execution
- // context's thread is accessed by GCed lifetime objects when
- // they're finalized.
- // FIXME: oilpan: avoid by explicitly removing the WorkerGlobalScope
- // as an observable context right here.
+ removeAllLifecycleObservers();
Mads Ager (chromium) 2014/03/17 06:46:14 This seems subtle enough that we should probably h
sof 2014/03/17 07:46:41 Yes, tried to clarify the reason for explicitly do
+ clearThread();
}
void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState& exceptionState)

Powered by Google App Engine
This is Rietveld 408576698