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

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

Issue 2075243002: Worker: Early return if termination is requested while worker thread is starting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a test Created 4 years, 6 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 f78949695aba6d80d8f58a301e0a4bb9ed1779e9..07896af90af00783e7e8521ddab9811cb381677c 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
@@ -487,9 +487,16 @@ void WorkerThread::initializeOnWorkerThread(std::unique_ptr<WorkerThreadStartupD
}
}
- if (startMode == PauseWorkerGlobalScopeOnStart)
+ if (startMode == PauseWorkerGlobalScopeOnStart) {
startRunningDebuggerTasksOnPauseOnWorkerThread();
+ // WorkerThread may be ready to shut down at this point if termination
+ // is requested while the debugger task is running. Shutdown sequence
+ // will start soon.
+ if (m_readyToShutdown)
+ return;
+ }
+
if (m_workerGlobalScope->scriptController()->isContextInitialized()) {
m_workerReportingProxy.didInitializeWorkerContext();
v8::HandleScope handleScope(isolate());
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerThread.h ('k') | third_party/WebKit/Source/core/workers/WorkerThreadTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698