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

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

Issue 1111693003: Remove the concept of a cleanup task (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Don't run tasks if thread was never initialized. Created 5 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/workers/WorkerGlobalScope.cpp ('k') | 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/WorkerThread.h
diff --git a/Source/core/workers/WorkerThread.h b/Source/core/workers/WorkerThread.h
index 38352bd1ad6fdb55dd0929b8f73310c828f44454..e6d67fa01cdacbe3a8d26eee247a1bc54b487237 100644
--- a/Source/core/workers/WorkerThread.h
+++ b/Source/core/workers/WorkerThread.h
@@ -46,9 +46,9 @@ namespace blink {
class WebWaitableEvent;
class WorkerGlobalScope;
class WorkerInspectorController;
+class WorkerMicrotaskRunner;
class WorkerReportingProxy;
class WorkerSharedTimer;
-class WorkerThreadShutdownFinishTask;
class WorkerThreadStartupData;
class WorkerThreadTask;
@@ -130,13 +130,13 @@ protected:
private:
friend class WorkerSharedTimer;
- friend class WorkerThreadShutdownFinishTask;
+ friend class WorkerMicrotaskRunner;
void stopInShutdownSequence();
void stopInternal();
void initialize();
- void cleanup();
+ void shutdown();
void idleHandler();
void postDelayedTask(PassOwnPtr<ExecutionContextTask>, long long delayMs);
void postDelayedTask(const WebTraceLocation&, PassOwnPtr<ExecutionContextTask>, long long delayMs);
@@ -152,7 +152,9 @@ private:
RefPtrWillBePersistent<WorkerInspectorController> m_workerInspectorController;
Mutex m_workerInspectorControllerMutex;
- Mutex m_threadCreationMutex;
+ // This lock protects |m_workerGlobalScope|, |m_terminated|, |m_isolate| and |m_microtaskRunner|.
+ Mutex m_threadStateMutex;
+
RefPtrWillBePersistent<WorkerGlobalScope> m_workerGlobalScope;
OwnPtr<WorkerThreadStartupData> m_startupData;
« no previous file with comments | « Source/core/workers/WorkerGlobalScope.cpp ('k') | Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698