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

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

Issue 2262023002: Worker: Wait for termination by WorkerThreadLifecycleObserver instead of WaitableEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments Created 4 years, 4 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: third_party/WebKit/Source/core/workers/WorkerThread.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.cpp b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
index 9588cd07371729bf75118303720b776d55716a71..28da9d0141874da39b2dadd796626f294d6837a3 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
@@ -336,9 +336,6 @@ WorkerThread::WorkerThread(PassRefPtr<WorkerLoaderProxy> workerLoaderProxy, Work
, m_inspectorTaskRunner(wrapUnique(new InspectorTaskRunner()))
, m_workerLoaderProxy(workerLoaderProxy)
, m_workerReportingProxy(workerReportingProxy)
- , m_terminationEvent(wrapUnique(new WaitableEvent(
- WaitableEvent::ResetPolicy::Manual,
- WaitableEvent::InitialState::NonSignaled)))
, m_shutdownEvent(wrapUnique(new WaitableEvent(
WaitableEvent::ResetPolicy::Manual,
WaitableEvent::InitialState::NonSignaled)))
@@ -390,10 +387,6 @@ void WorkerThread::terminateInternal(TerminationMode mode)
}
m_terminated = true;
- // Signal the thread to notify that the thread's stopping.
- if (m_terminationEvent)
- m_terminationEvent->signal();
-
if (!hasBeenInitialized) {
// If the worker thread was never initialized, don't start another
// shutdown, but still wait for the thread to signal when shutdown

Powered by Google App Engine
This is Rietveld 408576698