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

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

Issue 1857713004: DevTools: simplify the async instrumentation harness. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: same with scriptpromiseresolver Created 4 years, 8 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: third_party/WebKit/Source/core/workers/WorkerThread.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.cpp b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
index 5ae35a9dc099b60097c030b08d8d071b7d0984be..a36c4827dd31875d8ea8781134bc37b8d4e941e9 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
@@ -116,11 +116,8 @@ void WorkerThread::performTask(PassOwnPtr<ExecutionContextTask> task, bool isIns
return;
}
- if (isInstrumented)
- InspectorInstrumentation::willPerformExecutionContextTask(globalScope, task.get());
+ InspectorInstrumentation::AsyncTask asyncTask(globalScope, task.get(), isInstrumented);
task->performTask(globalScope);
- if (isInstrumented)
- InspectorInstrumentation::didPerformExecutionContextTask(globalScope);
}
PassOwnPtr<CrossThreadClosure> WorkerThread::createWorkerThreadTask(PassOwnPtr<ExecutionContextTask> task, bool isInstrumented)
@@ -130,7 +127,7 @@ PassOwnPtr<CrossThreadClosure> WorkerThread::createWorkerThreadTask(PassOwnPtr<E
if (isInstrumented) {
// TODO(hiroshige): This doesn't work when called on the main thread.
// https://crbug.com/588497
- InspectorInstrumentation::didPostExecutionContextTask(workerGlobalScope(), task.get());
+ InspectorInstrumentation::scheduleAsyncTask(workerGlobalScope(), "Worker task", task.get());
}
return threadSafeBind(&WorkerThread::performTask, AllowCrossThreadAccess(this), task, isInstrumented);
}
@@ -350,7 +347,7 @@ void WorkerThread::terminateInternal()
else
terminateV8Execution();
- InspectorInstrumentation::didKillAllExecutionContextTasks(m_workerGlobalScope.get());
+ InspectorInstrumentation::cancelAllAsyncTasks(m_workerGlobalScope.get());
m_inspectorTaskRunner->kill();
backingThread().postTask(BLINK_FROM_HERE, threadSafeBind(&WorkerThread::shutdown, AllowCrossThreadAccess(this)));
}

Powered by Google App Engine
This is Rietveld 408576698