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

Unified Diff: Source/bindings/v8/custom/V8ArrayBufferViewCustom.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/V8ArrayBufferViewCustom.cpp
diff --git a/Source/bindings/v8/custom/V8ArrayBufferViewCustom.cpp b/Source/bindings/v8/custom/V8ArrayBufferViewCustom.cpp
index 4f00d0df9333a1f0dc7524016bc248db1036b54e..5ee873dd6cb78609584747c55046712e3da8cd5f 100644
--- a/Source/bindings/v8/custom/V8ArrayBufferViewCustom.cpp
+++ b/Source/bindings/v8/custom/V8ArrayBufferViewCustom.cpp
@@ -82,5 +82,9 @@ ArrayBufferView* V8ArrayBufferView::toNative(v8::Handle<v8::Object> object)
return 0;
}
+ArrayBufferView* V8ArrayBufferView::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
+{
+ return V8ArrayBufferView::hasInstance(value, isolate) ? V8ArrayBufferView::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
+}
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/custom/V8ArrayBufferViewCustom.h ('k') | Source/bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698