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

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

Issue 203233004: Oilpan: Fix worker thread termination finalization order issues. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Update comment. 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
« no previous file with comments | « no previous file | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerGlobalScope.cpp
diff --git a/Source/core/workers/WorkerGlobalScope.cpp b/Source/core/workers/WorkerGlobalScope.cpp
index 1699766d3f6631ec4627747717212073bf0bc3d1..70781285349df847ad0924c5a3d0752db896cc63 100644
--- a/Source/core/workers/WorkerGlobalScope.cpp
+++ b/Source/core/workers/WorkerGlobalScope.cpp
@@ -196,18 +196,16 @@ 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.
+ // We do not clear the thread field of the
+ // WorkerGlobalScope. Other objects keep the worker global scope
+ // alive because they need its thread field to check that work is
+ // being carried out on the right thread. We therefore cannot clear
+ // the thread field before all references to the worker global
+ // scope are gone.
}
void WorkerGlobalScope::importScripts(const Vector<String>& urls, ExceptionState& exceptionState)
« no previous file with comments | « no previous file | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698