// (This is signalled on the main thread, so it's assumed to be waited on the worker context thread)
blink::WebWaitableEvent* shutdownEvent() { return m_shutdownEvent.get(); }
+ blink::WebWaitableEvent* terminationEvent() { return m_terminationEvent.get(); }
+ static void terminateAndWaitForAllWorkers();
+
bool isCurrentThread() const;
WorkerLoaderProxy& workerLoaderProxy() const { return m_workerLoaderProxy; }
WorkerReportingProxy& workerReportingProxy() const { return m_workerReportingProxy; }
friend class WorkerSharedTimer;
friend class WorkerThreadShutdownFinishTask;
+ void stopInShutdownSequence();
+ void stopInternal();
+
void initialize();
void cleanup();
void idleHandler();
// Used to signal thread shutdown.
OwnPtr<blink::WebWaitableEvent> m_shutdownEvent;
+ // Used to signal thread termination.
+ OwnPtr<blink::WebWaitableEvent> m_terminationEvent;
+
// FIXME: This has to be last because of crbug.com/401397 - the
// WorkerThread might get deleted before it had a chance to properly
// shut down. By deleting the WebThread first, we can guarantee that