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

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: 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..c787b34498b3349dbee0a4dc961d6dd65f388558 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
@@ -117,10 +117,10 @@ void WorkerThread::performTask(PassOwnPtr<ExecutionContextTask> task, bool isIns
}
if (isInstrumented)
- InspectorInstrumentation::willPerformExecutionContextTask(globalScope, task.get());
+ InspectorInstrumentation::asyncTaskStarted(globalScope, task.get());
task->performTask(globalScope);
if (isInstrumented)
- InspectorInstrumentation::didPerformExecutionContextTask(globalScope);
+ InspectorInstrumentation::asyncTaskFinished(globalScope, task.get());
}
PassOwnPtr<CrossThreadClosure> WorkerThread::createWorkerThreadTask(PassOwnPtr<ExecutionContextTask> task, bool isInstrumented)
@@ -130,7 +130,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 +350,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