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

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

Issue 2640813006: Worker: Move instrumentation flag check from WorkerThread to WorkerOrWorkletGlobalScope (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerThread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eb572eff34db569afc2c8edf7ebc06ccab518874..6b9fdb892abd266bb2abf9029b819d9dcde32864 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
@@ -190,19 +190,13 @@ bool WorkerThread::isCurrentThread() {
}
void WorkerThread::postTask(const WebTraceLocation& location,
- std::unique_ptr<ExecutionContextTask> task,
- bool isInstrumented) {
+ std::unique_ptr<ExecutionContextTask> task) {
if (isInShutdown())
return;
- if (isInstrumented) {
- DCHECK(isCurrentThread());
- InspectorInstrumentation::asyncTaskScheduled(globalScope(), "Worker task",
- task.get());
- }
workerBackingThread().backingThread().postTask(
location, crossThreadBind(&WorkerThread::performTaskOnWorkerThread,
crossThreadUnretained(this),
- WTF::passed(std::move(task)), isInstrumented));
+ WTF::passed(std::move(task))));
}
void WorkerThread::appendDebuggerTask(
@@ -564,14 +558,11 @@ void WorkerThread::performShutdownOnWorkerThread() {
}
void WorkerThread::performTaskOnWorkerThread(
- std::unique_ptr<ExecutionContextTask> task,
- bool isInstrumented) {
+ std::unique_ptr<ExecutionContextTask> task) {
DCHECK(isCurrentThread());
if (m_threadState != ThreadState::Running)
return;
- InspectorInstrumentation::AsyncTask asyncTask(globalScope(), task.get(),
- isInstrumented);
{
DEFINE_THREAD_SAFE_STATIC_LOCAL(
CustomCountHistogram, scopedUsCounter,
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerThread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698