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

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

Issue 2518073002: Worker: Use per-frame task runners from a worker thread (Closed)
Patch Set: rebase Created 4 years, 1 month 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/modules/compositorworker/CompositorWorkerThreadTest.cpp ('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/web/WebSharedWorkerImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
index c9a8b1e72186c0f9961150e0871dfdf18a60e92d..0167d8cd8018dc2a616d9ca8eb0d67bfad65a180 100644
--- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
@@ -255,13 +255,13 @@ ParentFrameTaskRunners* WebSharedWorkerImpl::getParentFrameTaskRunners() {
}
void WebSharedWorkerImpl::didCloseWorkerGlobalScope() {
- // TODO(nhiroki): Replace this with getParentFrameTaskRunners().
- // (https://crbug.com/667310)
- Platform::current()->mainThread()->getWebTaskRunner()->postTask(
- BLINK_FROM_HERE,
- crossThreadBind(
- &WebSharedWorkerImpl::didCloseWorkerGlobalScopeOnMainThread,
- crossThreadUnretained(this)));
+ getParentFrameTaskRunners()
+ ->get(TaskType::Internal)
+ ->postTask(
+ BLINK_FROM_HERE,
+ crossThreadBind(
+ &WebSharedWorkerImpl::didCloseWorkerGlobalScopeOnMainThread,
+ crossThreadUnretained(this)));
}
void WebSharedWorkerImpl::didCloseWorkerGlobalScopeOnMainThread() {
@@ -271,13 +271,12 @@ void WebSharedWorkerImpl::didCloseWorkerGlobalScopeOnMainThread() {
}
void WebSharedWorkerImpl::didTerminateWorkerThread() {
- // TODO(nhiroki): Replace this with getParentFrameTaskRunners().
- // (https://crbug.com/667310)
- Platform::current()->mainThread()->getWebTaskRunner()->postTask(
- BLINK_FROM_HERE,
- crossThreadBind(
- &WebSharedWorkerImpl::didTerminateWorkerThreadOnMainThread,
- crossThreadUnretained(this)));
+ getParentFrameTaskRunners()
+ ->get(TaskType::Internal)
+ ->postTask(BLINK_FROM_HERE,
+ crossThreadBind(
+ &WebSharedWorkerImpl::didTerminateWorkerThreadOnMainThread,
+ crossThreadUnretained(this)));
}
void WebSharedWorkerImpl::didTerminateWorkerThreadOnMainThread() {
« no previous file with comments | « third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698