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

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

Issue 2327583002: Reland of [Fetch API] Start reading blob only when the reader wants to read contents. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandleTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c2283f909dde6225d2e574682dad4dcf708ee49c..59390959a335a000cb8765aefb19e2c83966526c 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandle.cpp
@@ -194,12 +194,12 @@
{
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;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/fetch/FetchBlobDataConsumerHandleTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698