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

Unified Diff: Source/bindings/core/v8/custom/V8FileReaderCustom.cpp

Issue 606653006: bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 2 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/bindings/core/v8/custom/V8FileReaderCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8FileReaderCustom.cpp b/Source/bindings/core/v8/custom/V8FileReaderCustom.cpp
index 5cfb8f7bf6871b5419dde3d22cd8df452b6f49c0..3f494f0e20e8eb934e29199ee04c98b83d4047c3 100644
--- a/Source/bindings/core/v8/custom/V8FileReaderCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8FileReaderCustom.cpp
@@ -31,8 +31,8 @@
#include "config.h"
#include "bindings/core/v8/V8FileReader.h"
+#include "bindings/core/v8/V8ArrayBuffer.h"
#include "bindings/core/v8/V8Binding.h"
-#include "bindings/core/v8/custom/V8ArrayBufferCustom.h"
#include "core/dom/ExecutionContext.h"
namespace blink {
@@ -42,7 +42,8 @@ void V8FileReader::resultAttributeGetterCustom(const v8::PropertyCallbackInfo<v8
v8::Handle<v8::Object> holder = info.Holder();
FileReader* impl = V8FileReader::toImpl(holder);
if (impl->readType() == FileReaderLoader::ReadAsArrayBuffer) {
- v8SetReturnValueFast(info, impl->arrayBufferResult(), impl);
+ RefPtr<DOMArrayBuffer> arrayBuffer = DOMArrayBuffer::create(impl->arrayBufferResult());
+ v8SetReturnValueFast(info, arrayBuffer.release(), impl);
haraken 2014/10/16 05:41:40 You can write DOMArrayBuffer::create(impl->arrayBu
Yuki 2014/10/16 14:21:50 Done.
return;
}
v8SetReturnValueStringOrNull(info, impl->stringResult(), info.GetIsolate());

Powered by Google App Engine
This is Rietveld 408576698