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

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: test fix 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..485ccbb1319d8d231bee18c7082258d8ccb9e4e4 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"
@@ -80,6 +81,11 @@ public:
m_client->didFetchDataLoadFailed();
}
+ WebTaskRunner* getTaskRunner() override
+ {
+ return m_client->getTaskRunner();
+ }
+
DEFINE_INLINE_TRACE()
{
visitor->trace(m_buffer);
@@ -296,6 +302,11 @@ void BodyStreamBuffer::didGetReadable()
processData();
}
+WebTaskRunner* BodyStreamBuffer::getTaskRunner()
+{
+ return TaskRunnerHelper::getUnthrottledTaskRunner(scriptState());
+}
+
bool BodyStreamBuffer::hasPendingActivity() const
{
if (m_loader)

Powered by Google App Engine
This is Rietveld 408576698