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

Unified Diff: third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp

Issue 2177243002: Use per-frame TaskRunner instead of thread's default in DataConsumerHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@data_consumer_handle_unique_ptr
Patch Set: update Created 4 years, 5 months 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/modules/fetch/BodyStreamBuffer.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp b/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp
index ea9bebed928461031340a6baa041b9e68de1e88c..ea6bc8455c355e66a359ee1ebf9b71b9540e4126 100644
--- a/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp
@@ -10,6 +10,7 @@
#include "core/dom/DOMArrayBuffer.h"
#include "core/dom/DOMTypedArray.h"
#include "core/dom/ExceptionCode.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/streams/ReadableStreamController.h"
#include "core/streams/ReadableStreamOperations.h"
#include "core/workers/WorkerGlobalScope.h"
@@ -102,7 +103,7 @@ BodyStreamBuffer::BodyStreamBuffer(ScriptState* scriptState, std::unique_ptr<Fet
: UnderlyingSourceBase(scriptState)
, m_scriptState(scriptState)
, m_handle(std::move(handle))
- , m_reader(m_handle->obtainFetchDataReader(this))
+ , m_reader(m_handle->obtainFetchDataReader(this, TaskRunnerHelper::getUnthrottledTaskRunner(scriptState)->clone()))
, m_madeFromReadableStream(false)
{
if (RuntimeEnabledFeatures::responseBodyWithV8ExtraStreamEnabled()) {
@@ -215,7 +216,7 @@ void BodyStreamBuffer::startLoading(FetchDataLoader* loader, FetchDataLoader::Cl
ASSERT(m_scriptState->contextIsValid());
std::unique_ptr<FetchDataConsumerHandle> handle = releaseHandle();
m_loader = loader;
- loader->start(handle.get(), new LoaderClient(m_scriptState->getExecutionContext(), this, client));
+ loader->start(handle.get(), new LoaderClient(m_scriptState->getExecutionContext(), this, client), TaskRunnerHelper::getUnthrottledTaskRunner(m_scriptState.get())->clone());
}
void BodyStreamBuffer::tee(BodyStreamBuffer** branch1, BodyStreamBuffer** branch2)

Powered by Google App Engine
This is Rietveld 408576698