Chromium Code Reviews| 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(); |