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

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

Issue 2644833002: Worker: Consolidate postTask implementation (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
Index: third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp
index d5b54478a8d5c5f73a4801a630a7a73b443047e5..9306f804f414698210b623780a34d3e1f414470a 100644
--- a/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerOrWorkletGlobalScope.cpp
@@ -32,4 +32,15 @@ void WorkerOrWorkletGlobalScope::addDeprecationMessage(
Deprecation::deprecationMessage(feature)));
}
+void WorkerOrWorkletGlobalScope::postTask(
+ TaskType,
+ const WebTraceLocation& location,
+ std::unique_ptr<ExecutionContextTask> task,
+ const String& taskNameForInstrumentation) {
+ if (!thread())
+ return;
+ thread()->postTask(location, std::move(task),
+ !taskNameForInstrumentation.isEmpty());
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698