Index: Source/bindings/core/v8/WorkerScriptDebugServer.cpp |
diff --git a/Source/bindings/core/v8/WorkerScriptDebugServer.cpp b/Source/bindings/core/v8/WorkerScriptDebugServer.cpp |
index 41b5a0d1fba6c823d788b0660a4a1fd056eea9d0..3dcf655bcc585be763bd9af73b69c4b0b61fb201 100644 |
--- a/Source/bindings/core/v8/WorkerScriptDebugServer.cpp |
+++ b/Source/bindings/core/v8/WorkerScriptDebugServer.cpp |
@@ -43,9 +43,10 @@ namespace blink { |
static const char* workerContextDebugId = "[worker]"; |
-WorkerScriptDebugServer::WorkerScriptDebugServer(WorkerGlobalScope* workerGlobalScope) |
+WorkerScriptDebugServer::WorkerScriptDebugServer(WebThread::TaskObserver* taskObserver, WorkerGlobalScope* workerGlobalScope) |
: PerIsolateDebuggerClient(v8::Isolate::GetCurrent(), ScriptDebugServer::create(v8::Isolate::GetCurrent(), this)) |
, m_listener(nullptr) |
+ , m_taskObserver(taskObserver) |
, m_workerGlobalScope(workerGlobalScope) |
{ |
} |
@@ -90,12 +91,12 @@ ScriptDebugListener* WorkerScriptDebugServer::getDebugListenerForContext(v8::Loc |
void WorkerScriptDebugServer::runMessageLoopOnPause(v8::Local<v8::Context>) |
{ |
MessageQueueWaitResult result; |
- m_workerGlobalScope->thread()->willEnterNestedLoop(); |
+ m_taskObserver->willProcessTask(); |
do { |
result = m_workerGlobalScope->thread()->runDebuggerTask(); |
// Keep waiting until execution is resumed. |
} while (result == MessageQueueMessageReceived && scriptDebugServer()->isPaused()); |
- m_workerGlobalScope->thread()->didLeaveNestedLoop(); |
+ m_taskObserver->didProcessTask(); |
// The listener may have been removed in the nested loop. |
if (m_listener) |