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

Unified Diff: third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp

Issue 2574703002: Use ParentFrameTaskRunners in WorkerLoaderProxyProvider::postTaskToLoader impls (Closed)
Patch Set: . Created 4 years 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/web/WebEmbeddedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
index 86215ef553cf10f86b96931cda4150819a73fc8b..ed6da37c2d52b08e750bcb7c9e5bcb870158c9a8 100644
--- a/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -263,10 +263,13 @@ void WebEmbeddedWorkerImpl::postMessageToPageInspector(const String& message) {
void WebEmbeddedWorkerImpl::postTaskToLoader(
const WebTraceLocation& location,
std::unique_ptr<ExecutionContextTask> task) {
- // TODO(hiroshige,yuryu): Make this not use ExecutionContextTask and
- // consider using m_mainThreadTaskRunners->get(TaskType::Networking)
- // instead.
- m_mainFrame->frame()->document()->postTask(location, std::move(task));
+ m_mainThreadTaskRunners->get(TaskType::Networking)
+ ->postTask(
+ BLINK_FROM_HERE,
+ crossThreadBind(
+ &ExecutionContextTask::performTaskIfContextIsValid,
+ WTF::passed(std::move(task)),
+ wrapCrossThreadWeakPersistent(m_mainFrame->frame()->document())));
}
void WebEmbeddedWorkerImpl::postTaskToWorkerGlobalScope(

Powered by Google App Engine
This is Rietveld 408576698