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

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

Issue 1167343002: Add methods for creating V8 extras-based ReadableStreams from C++ (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Don't modify UnderlyingSource.h, oops Created 4 years, 11 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/Response.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/Response.cpp b/third_party/WebKit/Source/modules/fetch/Response.cpp
index 99c972aa326f49856cba4998caca82001fbdc16c..e9138c8802955fa5dc50e11d8c1269187a160618 100644
--- a/third_party/WebKit/Source/modules/fetch/Response.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Response.cpp
@@ -133,8 +133,8 @@ Response* Response::create(ScriptState* scriptState, ScriptValue bodyValue, cons
// FormDataEncoder::generateUniqueBoundaryString.
contentType = AtomicString("multipart/form-data; boundary=", AtomicString::ConstructFromLiteral) + formData->boundary().data();
bodyHandle = FetchFormDataConsumerHandle::create(executionContext, formData.release());
- } else if (RuntimeEnabledFeatures::responseConstructedWithReadableStreamEnabled() && ReadableStreamOperations::isReadableStream(scriptState, body)) {
- bodyHandle = ReadableStreamDataConsumerHandle::create(scriptState, body);
+ } else if (RuntimeEnabledFeatures::responseConstructedWithReadableStreamEnabled() && ReadableStreamOperations::isReadableStream(scriptState, bodyValue)) {
+ bodyHandle = ReadableStreamDataConsumerHandle::create(scriptState, bodyValue);
} else {
String string = toUSVString(isolate, body, exceptionState);
if (exceptionState.hadException())

Powered by Google App Engine
This is Rietveld 408576698