| Index: third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp
|
| diff --git a/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp b/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp
|
| index 33a8c629df28584de2835342404475c2154ca71a..37f2e08f16088c438267b87ece19ea43cb29c7e8 100644
|
| --- a/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp
|
| +++ b/third_party/WebKit/Source/core/workers/ThreadedWorkletObjectProxy.cpp
|
| @@ -10,6 +10,7 @@
|
| #include "core/dom/ExecutionContext.h"
|
| #include "core/dom/ExecutionContextTask.h"
|
| #include "core/inspector/ConsoleMessage.h"
|
| +#include "core/workers/ParentFrameTaskRunners.h"
|
| #include "core/workers/ThreadedWorkletMessagingProxy.h"
|
| #include "wtf/Functional.h"
|
| #include "wtf/PtrUtil.h"
|
| @@ -44,14 +45,14 @@ void ThreadedWorkletObjectProxy::reportConsoleMessage(
|
| void ThreadedWorkletObjectProxy::postMessageToPageInspector(
|
| const String& message) {
|
| DCHECK(getExecutionContext()->isDocument());
|
| - // TODO(nhiroki): Replace this with getParentFrameTaskRunners().
|
| - // (https://crbug.com/667310)
|
| - toDocument(getExecutionContext())
|
| - ->postInspectorTask(
|
| - BLINK_FROM_HERE,
|
| - createCrossThreadTask(
|
| - &ThreadedWorkletMessagingProxy::postMessageToPageInspector,
|
| - m_messagingProxyWeakPtr, 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(
|
| + &ThreadedWorkletMessagingProxy::postMessageToPageInspector,
|
| + m_messagingProxyWeakPtr, message));
|
| }
|
|
|
| ParentFrameTaskRunners*
|
|
|