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

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

Issue 2534803002: Move InspectorTask handling from MainThreadTaskRunner to Document (Closed)
Patch Set: rebase 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
« no previous file with comments | « third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.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 0167d8cd8018dc2a616d9ca8eb0d67bfad65a180..f1984dd1a27f51b0b0d2bba742a1009705b9ca5a 100644
--- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
@@ -238,11 +238,15 @@ void WebSharedWorkerImpl::reportConsoleMessage(MessageSource,
}
void WebSharedWorkerImpl::postMessageToPageInspector(const String& message) {
- m_mainFrame->frame()->document()->postInspectorTask(
- BLINK_FROM_HERE,
- createCrossThreadTask(
- &WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread,
- crossThreadUnretained(this), message));
+ // The TaskType of Inspector tasks need to be Unthrottled because they need to
+ // run even on a suspended page.
+ getParentFrameTaskRunners()
+ ->get(TaskType::Unthrottled)
+ ->postTask(
+ BLINK_FROM_HERE,
+ crossThreadBind(
+ &WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread,
+ crossThreadUnretained(this), message));
}
void WebSharedWorkerImpl::postMessageToPageInspectorOnMainThread(
« no previous file with comments | « third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698