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

Unified Diff: Source/modules/serviceworkers/Cache.cpp

Issue 1018243002: [Fetch] Support various operations after reading data partially. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@async-read
Patch Set: Created 5 years, 9 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: Source/modules/serviceworkers/Cache.cpp
diff --git a/Source/modules/serviceworkers/Cache.cpp b/Source/modules/serviceworkers/Cache.cpp
index 5a1a5eac12fff23ec959457db8c4faea461f6b1c..22e7ba732fa8bb5d4147a25470ff9bbf035bfdaf 100644
--- a/Source/modules/serviceworkers/Cache.cpp
+++ b/Source/modules/serviceworkers/Cache.cpp
@@ -373,12 +373,7 @@ ScriptPromise Cache::putImpl(ScriptState* scriptState, Request* request, Respons
const ScriptPromise promise = resolver->promise();
if (BodyStreamBuffer* buffer = response->internalBuffer()) {
if (buffer == response->buffer() && response->streamAccessed()) {
horo 2015/03/20 02:28:54 nit: we can remove brackets.
yhirano 2015/03/20 03:24:49 Done.
- bool dataLost = false;
- buffer = response->createDrainingStream(&dataLost);
- if (dataLost) {
- resolver->reject(DOMException::create(NotSupportedError, "Storing the Response which .body is partially read is not supported."));
- return promise;
- }
+ buffer = response->createDrainingStream();
}
// If the response body type is stream, read the all data and create the
// blob handle and dispatch the put batch asynchronously.

Powered by Google App Engine
This is Rietveld 408576698