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

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: Created 7 years, 5 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 | Source/core/xml/XMLHttpRequest.h » ('j') | Source/core/xml/XMLHttpRequest.cpp » ('J')
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 e5071f7433b8b03b34cf8f45812e400a166aa289..fced807090fd7c8730900daaf00f071de71b87d7 100644
--- a/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -36,10 +36,12 @@
#include "V8Document.h"
#include "V8FormData.h"
#include "V8HTMLDocument.h"
+#include "V8Stream.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8Utilities.h"
#include "bindings/v8/custom/V8ArrayBufferCustom.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"
@@ -115,6 +117,18 @@ void V8XMLHttpRequest::responseAttrGetterCustom(v8::Local<v8::String> name, cons
return;
}
+ case XMLHttpRequest::ResponseTypeStream:
+ {
+ ExceptionCode ec = 0;
+ Stream* stream = xmlHttpRequest->responseStream(ec);
+ if (ec) {
+ setDOMException(ec, info.GetIsolate());
+ return;
+ }
+ v8SetReturnValue(info, toV8Fast(stream, info, xmlHttpRequest));
+ return;
+ }
+
case XMLHttpRequest::ResponseTypeArrayBuffer:
{
ExceptionCode ec = 0;
« no previous file with comments | « no previous file | Source/core/xml/XMLHttpRequest.h » ('j') | Source/core/xml/XMLHttpRequest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698