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

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

Issue 2303753003: [Fetch API] Start reading blob only when the reader wants to read contents. (Closed)
Patch Set: fix tests Created 4 years, 3 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/FetchBlobDataConsumerHandle.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp b/third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp
index 11474211176240b3c233b5234a2859f7940eb18a..ae749f25054331a79e498b7b6cbbd4dcca9e3b81 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp
@@ -191,12 +191,12 @@ public:
{
if (m_readerContext->drained())
return Done;
- m_readerContext->ensureStartLoader();
Result r = m_reader->read(data, size, flags, readSize);
if (!(size == 0 && (r == Ok || r == ShouldWait))) {
// We read non-empty data, so we cannot use the blob data
// handle which represents the whole data.
m_readerContext->clearBlobDataHandleForDrain();
+ m_readerContext->ensureStartLoader();
}
return r;
}

Powered by Google App Engine
This is Rietveld 408576698