diff options
Diffstat (limited to 'Source/WebKit/chromium/src/WebArrayBuffer.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/WebArrayBuffer.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/WebKit/chromium/src/WebArrayBuffer.cpp b/Source/WebKit/chromium/src/WebArrayBuffer.cpp index 888c048e4..d43874b63 100644 --- a/Source/WebKit/chromium/src/WebArrayBuffer.cpp +++ b/Source/WebKit/chromium/src/WebArrayBuffer.cpp @@ -31,8 +31,8 @@ #include "config.h" #include "WebArrayBuffer.h" -#include "ArrayBuffer.h" #include "V8ArrayBuffer.h" +#include <wtf/ArrayBuffer.h> #include <wtf/PassOwnPtr.h> using namespace WebCore; @@ -74,6 +74,14 @@ v8::Handle<v8::Value> WebArrayBuffer::toV8Value() { return V8ArrayBuffer::wrap(m_private.get()); } + +WebArrayBuffer* WebArrayBuffer::createFromV8Value(v8::Handle<v8::Value> value) +{ + if (!V8ArrayBuffer::HasInstance(value)) + return 0; + WTF::ArrayBuffer* buffer = V8ArrayBuffer::toNative(value->ToObject()); + return new WebArrayBuffer(buffer); +} #endif WebArrayBuffer::WebArrayBuffer(const WTF::PassRefPtr<WTF::ArrayBuffer>& blob) |