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

Unified Diff: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.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
Index: third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
diff --git a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
index 7f6f81b1b9e1f8e90603e49de0dae8c32a3632d1..01d79fb3a867d8e1868a11eed24e9bf5c4219662 100644
--- a/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
+++ b/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp
@@ -353,10 +353,14 @@ void ServiceWorkerGlobalScopeProxy::reportConsoleMessage(
void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(
const String& message) {
DCHECK(m_embeddedWorker);
- document().postInspectorTask(
- BLINK_FROM_HERE,
- createCrossThreadTask(&WebEmbeddedWorkerImpl::postMessageToPageInspector,
- crossThreadUnretained(m_embeddedWorker), 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(&WebEmbeddedWorkerImpl::postMessageToPageInspector,
+ crossThreadUnretained(m_embeddedWorker), message));
}
ParentFrameTaskRunners*

Powered by Google App Engine
This is Rietveld 408576698