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

Unified Diff: Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp

Issue 18883002: Add Streams API support to XMLHttpRequest (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: kinuko's comment Created 7 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 | « LayoutTests/http/tests/xmlhttprequest/response-stream-expected.txt ('k') | Source/core/fileapi/Stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
diff --git a/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
index f28fa19fe26395e21432fe1529d738d0c285f7fb..78b72c144fdada5c48e13c4a883cca7de5c92d1a 100644
--- a/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -35,12 +35,14 @@
#include "V8Document.h"
#include "V8FormData.h"
#include "V8HTMLDocument.h"
+#include "V8Stream.h"
#include "bindings/v8/ExceptionState.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8Utilities.h"
#include "bindings/v8/custom/V8ArrayBufferCustom.h"
#include "bindings/v8/custom/V8ArrayBufferViewCustom.h"
#include "core/dom/Document.h"
+#include "core/fileapi/Stream.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/page/Frame.h"
#include "core/workers/WorkerGlobalScope.h"
@@ -136,6 +138,13 @@ void V8XMLHttpRequest::responseAttributeGetterCustom(v8::Local<v8::String> name,
return;
}
+ case XMLHttpRequest::ResponseTypeStream:
+ {
+ Stream* stream = xmlHttpRequest->responseStream();
+ v8SetReturnValueFast(info, stream, xmlHttpRequest);
+ return;
+ }
+
case XMLHttpRequest::ResponseTypeArrayBuffer:
{
ArrayBuffer* arrayBuffer = xmlHttpRequest->responseArrayBuffer();
« no previous file with comments | « LayoutTests/http/tests/xmlhttprequest/response-stream-expected.txt ('k') | Source/core/fileapi/Stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698