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

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

Issue 1175313002: Add ASSERT(isMainThread()) to WorkerThread::start() and ::terminate() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 5 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
« no previous file with comments | « no previous file | no next file » | 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 ee06a089949d8c1f193bb1558b17f2e439fa86d6..7a70be8bb4a16562755b2bebd71e0c2c60e83426 100644
--- a/Source/core/workers/WorkerThread.cpp
+++ b/Source/core/workers/WorkerThread.cpp
@@ -177,6 +177,7 @@ WorkerThread::~WorkerThread()
void WorkerThread::start(PassOwnPtr<WorkerThreadStartupData> startupData)
{
+ ASSERT(isMainThread());
if (m_started)
return;
@@ -288,6 +289,7 @@ void WorkerThread::shutdown()
void WorkerThread::terminate()
{
+ ASSERT(isMainThread());
kinuko 2015/06/12 05:48:03 Should this rather be in terminateInternal() ?
Takashi Toyoshima 2015/06/15 05:01:03 Done.
// Prevent the deadlock between GC and an attempt to terminate a thread.
SafePointScope safePointScope(ThreadState::HeapPointersOnStack);
terminateInternal();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698