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

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

Issue 1312583007: Introduce WorkerThread::willShutdown() Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « Source/core/workers/WorkerThread.h ('k') | Source/core/workers/WorkerThreadTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerThread.cpp
diff --git a/Source/core/workers/WorkerThread.cpp b/Source/core/workers/WorkerThread.cpp
index e8c44a3c863da1942fe14243d6b8ba1f3218c482..be4ffb32c3f1661dfd14b6c8377ce348e32241b4 100644
--- a/Source/core/workers/WorkerThread.cpp
+++ b/Source/core/workers/WorkerThread.cpp
@@ -277,6 +277,7 @@ void WorkerThread::shutdown()
// This should be called before we start the shutdown procedure.
workerReportingProxy().willDestroyWorkerGlobalScope();
+ willShutdown();
workerGlobalScope()->dispose();
backingThread().removeTaskObserver(m_microtaskRunner.get());
@@ -456,6 +457,13 @@ v8::Isolate* WorkerThread::initializeIsolate()
return isolate;
}
+void WorkerThread::willShutdown()
+{
+ ASSERT(isCurrentThread());
+ ASSERT(m_isolate);
+ ASSERT(m_workerGlobalScope->script());
+}
+
void WorkerThread::willDestroyIsolate()
{
ASSERT(isCurrentThread());
« no previous file with comments | « Source/core/workers/WorkerThread.h ('k') | Source/core/workers/WorkerThreadTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698