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

Unified Diff: Source/bindings/core/v8/WorkerScriptDebugServer.cpp

Issue 1133903005: DevTools: [wip] do not use InspectorInstrumentation for will/didProcessTask events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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: 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)
« no previous file with comments | « Source/bindings/core/v8/WorkerScriptDebugServer.h ('k') | Source/core/inspector/InspectorInstrumentation.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698