| Index: third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp
|
| diff --git a/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp b/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp
|
| index bbfc917052e078b816cc3c646fa04c7ed86b20e1..4df31a1c0528a4f1463bb698757f353cb7a78853 100644
|
| --- a/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp
|
| +++ b/third_party/WebKit/Source/modules/fetch/ReadableStreamDataConsumerHandle.cpp
|
| @@ -14,6 +14,7 @@
|
| #include "bindings/core/v8/V8Uint8Array.h"
|
| #include "bindings/core/v8/WorkerOrWorkletScriptController.h"
|
| #include "core/dom/DOMTypedArray.h"
|
| +#include "core/dom/TaskRunnerHelper.h"
|
| #include "core/streams/ReadableStreamOperations.h"
|
| #include "core/workers/WorkerGlobalScope.h"
|
| #include "public/platform/Platform.h"
|
| @@ -241,8 +242,9 @@ public:
|
|
|
| void notifyLater()
|
| {
|
| - ASSERT(m_client);
|
| - Platform::current()->currentThread()->getWebTaskRunner()->postTask(BLINK_FROM_HERE, WTF::bind(&ReadingContext::notify, PassRefPtr<ReadingContext>(this)));
|
| + if (!m_client)
|
| + return;
|
| + TaskRunnerHelper::getUnthrottledTaskRunner(m_scriptState.get())->postTask(BLINK_FROM_HERE, WTF::bind(&ReadingContext::notify, PassRefPtr<ReadingContext>(this)));
|
| }
|
|
|
| private:
|
| @@ -264,8 +266,7 @@ private:
|
| if (m_isDone || m_hasError)
|
| return;
|
| m_hasError = true;
|
| - if (m_client)
|
| - notifyLater();
|
| + notifyLater();
|
| }
|
|
|
| static void onCollected(const v8::WeakCallbackInfo<ReadableStreamDataConsumerHandle::ReadingContext>& data)
|
|
|