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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfacePython.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsV alue, const v8::PropertyCallbackInfo<void>& info) 99 static void testInterfacePythonAttributeAttributeSetter(v8::Local<v8::Value> jsV alue, const v8::PropertyCallbackInfo<void>& info)
100 { 100 {
101 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceP ythonAttribute", "TestInterfacePython", info.Holder(), info.GetIsolate()); 101 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceP ythonAttribute", "TestInterfacePython", info.Holder(), info.GetIsolate());
102 if (!isUndefinedOrNull(jsValue) && !V8TestInterfacePython::hasInstance(jsVal ue, info.GetIsolate())) { 102 if (!isUndefinedOrNull(jsValue) && !V8TestInterfacePython::hasInstance(jsVal ue, info.GetIsolate())) {
103 exceptionState.throwTypeError("The provided value is not of type 'TestIn terfacePython'."); 103 exceptionState.throwTypeError("The provided value is not of type 'TestIn terfacePython'.");
104 exceptionState.throwIfNeeded(); 104 exceptionState.throwIfNeeded();
105 return; 105 return;
106 } 106 }
107 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 107 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
108 V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfac ePython::hasInstance(jsValue, info.GetIsolate()) ? V8TestInterfacePython::toNati ve(v8::Handle<v8::Object>::Cast(jsValue)) : 0); 108 V8TRYCATCH_VOID(TestInterfacePythonImplementation*, cppValue, V8TestInterfac ePython::toNativeWithTypeCheck(info.GetIsolate(), jsValue));
109 imp->setTestInterfacePythonAttribute(WTF::getPtr(cppValue)); 109 imp->setTestInterfacePythonAttribute(WTF::getPtr(cppValue));
110 } 110 }
111 111
112 static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::St ring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 112 static void testInterfacePythonAttributeAttributeSetterCallback(v8::Local<v8::St ring>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
113 { 113 {
114 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 114 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
115 TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAtt ributeSetter(jsValue, info); 115 TestInterfacePythonImplementationV8Internal::testInterfacePythonAttributeAtt ributeSetter(jsValue, info);
116 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 116 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
117 } 117 }
118 118
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 288 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
289 { 289 {
290 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterfacePython", info.Holder(), info.GetIsolate()); 290 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsNode Attribute", "TestInterfacePython", info.Holder(), info.GetIsolate());
291 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) { 291 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) {
292 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 292 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
293 exceptionState.throwIfNeeded(); 293 exceptionState.throwIfNeeded();
294 return; 294 return;
295 } 295 }
296 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 296 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
297 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0); 297 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue));
298 TestImplements::setImplementsNodeAttribute(imp, WTF::getPtr(cppValue)); 298 TestImplements::setImplementsNodeAttribute(imp, WTF::getPtr(cppValue));
299 } 299 }
300 300
301 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 301 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String> , v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
302 { 302 {
303 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 303 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
304 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut eSetter(jsValue, info); 304 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut eSetter(jsValue, info);
305 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 305 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
306 } 306 }
307 307
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 348
349 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info) 349 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V alue> jsValue, const v8::PropertyCallbackInfo<void>& info)
350 { 350 {
351 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsolate( )); 351 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsRunt imeEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsolate( ));
352 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) { 352 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) {
353 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 353 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
354 exceptionState.throwIfNeeded(); 354 exceptionState.throwIfNeeded();
355 return; 355 return;
356 } 356 }
357 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 357 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
358 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0); 358 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue));
359 TestImplements::setImplementsRuntimeEnabledNodeAttribute(imp, WTF::getPtr(cp pValue)); 359 TestImplements::setImplementsRuntimeEnabledNodeAttribute(imp, WTF::getPtr(cp pValue));
360 } 360 }
361 361
362 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info) 362 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi d>& info)
363 { 363 {
364 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 364 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
365 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt ributeAttributeSetter(jsValue, info); 365 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt ributeAttributeSetter(jsValue, info);
366 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 366 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
367 } 367 }
368 368
(...skipping 12 matching lines...) Expand all
381 381
382 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) 382 static void implementsPerContextEnabledNodeAttributeAttributeSetter(v8::Local<v8 ::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
383 { 383 {
384 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC ontextEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsola te()); 384 ExceptionState exceptionState(ExceptionState::SetterContext, "implementsPerC ontextEnabledNodeAttribute", "TestInterfacePython", info.Holder(), info.GetIsola te());
385 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) { 385 if (!isUndefinedOrNull(jsValue) && !V8Node::hasInstance(jsValue, info.GetIso late())) {
386 exceptionState.throwTypeError("The provided value is not of type 'Node'. "); 386 exceptionState.throwTypeError("The provided value is not of type 'Node'. ");
387 exceptionState.throwIfNeeded(); 387 exceptionState.throwIfNeeded();
388 return; 388 return;
389 } 389 }
390 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 390 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
391 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat e()) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(jsValue)) : 0); 391 V8TRYCATCH_VOID(Node*, cppValue, V8Node::toNativeWithTypeCheck(info.GetIsola te(), jsValue));
392 TestImplements::setImplementsPerContextEnabledNodeAttribute(imp, WTF::getPtr (cppValue)); 392 TestImplements::setImplementsPerContextEnabledNodeAttribute(imp, WTF::getPtr (cppValue));
393 } 393 }
394 394
395 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info) 395 static void implementsPerContextEnabledNodeAttributeAttributeSetterCallback(v8:: Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo< void>& info)
396 { 396 {
397 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 397 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
398 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode AttributeAttributeSetter(jsValue, info); 398 TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNode AttributeAttributeSetter(jsValue, info);
399 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 399 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
400 } 400 }
401 401
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 { 689 {
690 if (UNLIKELY(info.Length() < 1)) { 690 if (UNLIKELY(info.Length() < 1)) {
691 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", ExceptionMessages::notEnoughArguments(1, inf o.Length())), info.GetIsolate()); 691 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", ExceptionMessages::notEnoughArguments(1, inf o.Length())), info.GetIsolate());
692 return; 692 return;
693 } 693 }
694 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 694 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
695 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge tIsolate())) { 695 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge tIsolate())) {
696 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", "parameter 1 is not of type 'TestInterfaceEm pty'."), info.GetIsolate()); 696 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", "parameter 1 is not of type 'TestInterfaceEm pty'."), info.GetIsolate());
697 return; 697 return;
698 } 698 }
699 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[0])) : 0); 699 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
700 imp->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); 700 imp->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
701 } 701 }
702 702
703 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 703 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
704 { 704 {
705 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 705 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
706 TestInterfacePythonImplementationV8Internal::voidMethodTestInterfaceEmptyArg Method(info); 706 TestInterfacePythonImplementationV8Internal::voidMethodTestInterfaceEmptyArg Method(info);
707 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 707 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
708 } 708 }
709 709
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 exceptionState.throwIfNeeded(); 754 exceptionState.throwIfNeeded();
755 return; 755 return;
756 } 756 }
757 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 757 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
758 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 758 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
759 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], info.Ge tIsolate())) { 759 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], info.Ge tIsolate())) {
760 exceptionState.throwTypeError("parameter 2 is not of type 'TestInterface Empty'."); 760 exceptionState.throwTypeError("parameter 2 is not of type 'TestInterface Empty'.");
761 exceptionState.throwIfNeeded(); 761 exceptionState.throwIfNeeded();
762 return; 762 return;
763 } 763 }
764 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[1], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[1])) : 0); 764 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::toNativeWithTypeCheck(info.GetIsolate(), info[1]));
765 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 765 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
766 RefPtr<TestInterfaceEmpty> result = TestImplements::implementsComplexMethod( scriptContext, imp, strArg, testInterfaceEmptyArg, exceptionState); 766 RefPtr<TestInterfaceEmpty> result = TestImplements::implementsComplexMethod( scriptContext, imp, strArg, testInterfaceEmptyArg, exceptionState);
767 if (exceptionState.throwIfNeeded()) 767 if (exceptionState.throwIfNeeded())
768 return; 768 return;
769 v8SetReturnValue(info, result.release()); 769 v8SetReturnValue(info, result.release());
770 } 770 }
771 771
772 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 772 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
773 { 773 {
774 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 774 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v 8::FunctionTemplate>(isolate, templ)); 1079 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v 8::FunctionTemplate>(isolate, templ));
1080 return handleScope.Escape(templ); 1080 return handleScope.Escape(templ);
1081 } 1081 }
1082 1082
1083 bool V8TestInterfacePython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isola te* isolate) 1083 bool V8TestInterfacePython::hasInstance(v8::Handle<v8::Value> jsValue, v8::Isola te* isolate)
1084 { 1084 {
1085 return V8PerIsolateData::from(isolate)->hasInstanceInMainWorld(&wrapperTypeI nfo, jsValue) 1085 return V8PerIsolateData::from(isolate)->hasInstanceInMainWorld(&wrapperTypeI nfo, jsValue)
1086 || V8PerIsolateData::from(isolate)->hasInstanceInNonMainWorld(&wrapperTy peInfo, jsValue); 1086 || V8PerIsolateData::from(isolate)->hasInstanceInNonMainWorld(&wrapperTy peInfo, jsValue);
1087 } 1087 }
1088 1088
1089 TestInterfacePythonImplementation* V8TestInterfacePython::toNativeWithTypeCheck( v8::Isolate* isolate, v8::Handle<v8::Value> value)
1090 {
1091 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0;
1092 }
1093
1089 void V8TestInterfacePython::installPerContextEnabledProperties(v8::Handle<v8::Ob ject> instanceTemplate, TestInterfacePythonImplementation* impl, v8::Isolate* is olate) 1094 void V8TestInterfacePython::installPerContextEnabledProperties(v8::Handle<v8::Ob ject> instanceTemplate, TestInterfacePythonImplementation* impl, v8::Isolate* is olate)
1090 { 1095 {
1091 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan ceTemplate->GetPrototype()); 1096 v8::Local<v8::Object> prototypeTemplate = v8::Local<v8::Object>::Cast(instan ceTemplate->GetPrototype());
1092 if (ContextFeatures::implementsContextNameEnabled(impl->document())) { 1097 if (ContextFeatures::implementsContextNameEnabled(impl->document())) {
1093 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\ 1098 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu ration =\
1094 {"implementsPerContextEnabledNodeAttribute", TestInterfacePythonImplemen tationV8Internal::implementsPerContextEnabledNodeAttributeAttributeGetterCallbac k, TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNodeA ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; 1099 {"implementsPerContextEnabledNodeAttribute", TestInterfacePythonImplemen tationV8Internal::implementsPerContextEnabledNodeAttributeAttributeGetterCallbac k, TestInterfacePythonImplementationV8Internal::implementsPerContextEnabledNodeA ttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEF AULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
1095 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate); 1100 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate , attributeConfiguration, isolate);
1096 } 1101 }
1097 } 1102 }
1098 1103
1099 ActiveDOMObject* V8TestInterfacePython::toActiveDOMObject(v8::Handle<v8::Object> wrapper) 1104 ActiveDOMObject* V8TestInterfacePython::toActiveDOMObject(v8::Handle<v8::Object> wrapper)
1100 { 1105 {
1101 return toNative(wrapper); 1106 return toNative(wrapper);
1102 } 1107 }
1103 1108
1104 void V8TestInterfacePython::derefObject(void* object) 1109 void V8TestInterfacePython::derefObject(void* object)
1105 { 1110 {
1106 fromInternalPointer(object)->deref(); 1111 fromInternalPointer(object)->deref();
1107 } 1112 }
1108 1113
1109 template<> 1114 template<>
1110 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8:: Handle<v8::Object> creationContext, v8::Isolate* isolate) 1115 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8:: Handle<v8::Object> creationContext, v8::Isolate* isolate)
1111 { 1116 {
1112 return toV8(impl, creationContext, isolate); 1117 return toV8(impl, creationContext, isolate);
1113 } 1118 }
1114 1119
1115 } // namespace WebCore 1120 } // namespace WebCore
1116 #endif // ENABLE(CONDITION) 1121 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfacePython.h ('k') | Source/bindings/tests/results/V8TestInterfacePython2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698