Chromium Code Reviews| Index: Source/core/workers/WorkerThread.cpp |
| diff --git a/Source/core/workers/WorkerThread.cpp b/Source/core/workers/WorkerThread.cpp |
| index b04391a18c04666cd2b1d94e7c2d2366d1203f90..e39a24eeba2fddfbe80040ae5d8b44f0fd0d4589 100644 |
| --- a/Source/core/workers/WorkerThread.cpp |
| +++ b/Source/core/workers/WorkerThread.cpp |
| @@ -30,6 +30,8 @@ |
| #include "bindings/v8/ScriptSourceCode.h" |
| #include "core/inspector/InspectorInstrumentation.h" |
| +#include "core/inspector/WorkerDebuggerAgent.h" |
| +#include "core/inspector/WorkerInspectorController.h" |
| #include "core/workers/DedicatedWorkerGlobalScope.h" |
| #include "core/workers/WorkerClients.h" |
| #include "core/workers/WorkerReportingProxy.h" |
| @@ -102,12 +104,17 @@ void WorkerThread::workerThreadStart(void* thread) |
| static_cast<WorkerThread*>(thread)->workerThread(); |
| } |
| +void WorkerThread::interruptAndDispatchInspectorCommands() |
| +{ |
| + if (m_workerDebuggerAgent) |
|
yurys
2014/06/24 08:49:52
m_workerDebuggerAgent is never initialized as I po
keishi
2014/06/24 14:53:29
I added a mutex to WorkerThread so that WorkerThre
yurys
2014/06/25 05:51:57
The simplest way would be to add a layout test bas
yurys
2014/06/25 07:50:27
Never mind, I'm adding a new test for this: https:
|
| + m_workerDebuggerAgent->interruptAndDispatchInspectorCommands(this); |
| +} |
| + |
| void WorkerThread::workerThread() |
| { |
| KURL scriptURL = m_startupData->m_scriptURL; |
| String sourceCode = m_startupData->m_sourceCode; |
| WorkerThreadStartMode startMode = m_startupData->m_startMode; |
| - |
| { |
| MutexLocker lock(m_threadCreationMutex); |
| ThreadState::attach(); |
| @@ -134,6 +141,7 @@ void WorkerThread::workerThread() |
| script->evaluate(ScriptSourceCode(sourceCode, scriptURL)); |
| runEventLoop(); |
| + m_workerDebuggerAgent.clear(); |
| // This should be called before we start the shutdown procedure. |
| workerReportingProxy().willDestroyWorkerGlobalScope(); |