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

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

Issue 171533006: V8 Binding: Introduce toNativeWithTypeCheck (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/v8/custom/V8ArrayBufferCustom.cpp
diff --git a/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp b/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp
index 497caec7c2613a3f2356d694dd0da14b17572e92..916898404a7afd507445548b65905b62a68065e8 100644
--- a/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp
+++ b/Source/bindings/v8/custom/V8ArrayBufferCustom.cpp
@@ -94,6 +94,11 @@ ArrayBuffer* V8ArrayBuffer::toNative(v8::Handle<v8::Object> object)
return reinterpret_cast<ArrayBuffer*>(arraybufferPtr);
}
+ArrayBuffer* V8ArrayBuffer::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
+{
+ return V8ArrayBuffer::hasInstance(value, isolate) ? V8ArrayBuffer::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
+}
+
template<>
v8::Handle<v8::Value> toV8NoInline(ArrayBuffer* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
« no previous file with comments | « Source/bindings/v8/custom/V8ArrayBufferCustom.h ('k') | Source/bindings/v8/custom/V8ArrayBufferViewCustom.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698