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

Unified Diff: Source/bindings/tests/results/V8TestInterfaceNode.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/tests/results/V8TestInterfaceNode.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceNode.cpp b/Source/bindings/tests/results/V8TestInterfaceNode.cpp
index 675146a4062ea0f0a50526814cd8f7b710ef170a..7b361774969c5ec3dc631ae3ff749d2d85643623 100644
--- a/Source/bindings/tests/results/V8TestInterfaceNode.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceNode.cpp
@@ -355,6 +355,11 @@ bool V8TestInterfaceNode::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate
|| V8PerIsolateData::from(isolate)->hasInstanceInNonMainWorld(&wrapperTypeInfo, jsValue);
}
+TestInterfaceNode* V8TestInterfaceNode::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8::Value> value)
+{
+ return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Object>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0;
+}
+
EventTarget* V8TestInterfaceNode::toEventTarget(v8::Handle<v8::Object> object)
{
return toNative(object);
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfaceNode.h ('k') | Source/bindings/tests/results/V8TestInterfacePython.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698