| OLD | NEW |
| 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 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! | 31 // This file has been auto-generated by code_generator_v8.pm. DO NOT MODIFY! |
| 32 | 32 |
| 33 #include "config.h" | 33 #include "config.h" |
| 34 #if ENABLE(CONDITION) | 34 #if ENABLE(CONDITION) |
| 35 #include "V8TestInterfacePython.h" | 35 #include "V8TestInterfacePython.h" |
| 36 | 36 |
| 37 #include "RuntimeEnabledFeatures.h" | 37 #include "RuntimeEnabledFeatures.h" |
| 38 #include "V8Node.h" |
| 38 #include "V8ReferencedType.h" | 39 #include "V8ReferencedType.h" |
| 40 #include "V8TestInterfaceEmpty.h" |
| 41 #include "bindings/tests/idls/TestImplements.h" |
| 39 #include "bindings/tests/idls/TestPartialInterfacePython.h" | 42 #include "bindings/tests/idls/TestPartialInterfacePython.h" |
| 40 #include "bindings/v8/ExceptionState.h" | 43 #include "bindings/v8/ExceptionState.h" |
| 44 #include "bindings/v8/V8AbstractEventListener.h" |
| 41 #include "bindings/v8/V8DOMConfiguration.h" | 45 #include "bindings/v8/V8DOMConfiguration.h" |
| 46 #include "bindings/v8/V8EventListenerList.h" |
| 42 #include "bindings/v8/V8ObjectConstructor.h" | 47 #include "bindings/v8/V8ObjectConstructor.h" |
| 43 #include "core/dom/ContextFeatures.h" | 48 #include "core/dom/ContextFeatures.h" |
| 44 #include "core/dom/Document.h" | 49 #include "core/dom/Document.h" |
| 45 #include "platform/TraceEvent.h" | 50 #include "platform/TraceEvent.h" |
| 46 #include "wtf/GetPtr.h" | 51 #include "wtf/GetPtr.h" |
| 47 #include "wtf/RefPtr.h" | 52 #include "wtf/RefPtr.h" |
| 48 | 53 |
| 49 namespace WebCore { | 54 namespace WebCore { |
| 50 | 55 |
| 51 static void initializeScriptWrappableForInterface(TestInterfacePythonImplementat
ion* object) | 56 static void initializeScriptWrappableForInterface(TestInterfacePythonImplementat
ion* object) |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 imp->setPerWorldBindingsStringAttribute(cppValue); | 178 imp->setPerWorldBindingsStringAttribute(cppValue); |
| 174 } | 179 } |
| 175 | 180 |
| 176 static void perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld(v
8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackIn
fo<void>& info) | 181 static void perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld(v
8::Local<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackIn
fo<void>& info) |
| 177 { | 182 { |
| 178 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); | 183 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 179 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute
AttributeSetterForMainWorld(jsValue, info); | 184 TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttribute
AttributeSetterForMainWorld(jsValue, info); |
| 180 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 185 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 181 } | 186 } |
| 182 | 187 |
| 188 static void implementsStaticReadOnlyLongAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 189 { |
| 190 v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyLongAttrib
ute()); |
| 191 } |
| 192 |
| 193 static void implementsStaticReadOnlyLongAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 194 { |
| 195 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 196 TestInterfacePythonImplementationV8Internal::implementsStaticReadOnlyLongAtt
ributeAttributeGetter(info); |
| 197 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 198 } |
| 199 |
| 200 static void implementsStaticStringAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 201 { |
| 202 v8SetReturnValueString(info, TestImplements::implementsStaticStringAttribute
(), info.GetIsolate()); |
| 203 } |
| 204 |
| 205 static void implementsStaticStringAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 206 { |
| 207 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 208 TestInterfacePythonImplementationV8Internal::implementsStaticStringAttribute
AttributeGetter(info); |
| 209 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 210 } |
| 211 |
| 212 static void implementsStaticStringAttributeAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 213 { |
| 214 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
| 215 TestImplements::setImplementsStaticStringAttribute(cppValue); |
| 216 } |
| 217 |
| 218 static void implementsStaticStringAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) |
| 219 { |
| 220 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 221 TestInterfacePythonImplementationV8Internal::implementsStaticStringAttribute
AttributeSetter(jsValue, info); |
| 222 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 223 } |
| 224 |
| 225 static void implementsReadonlyStringAttributeAttributeGetter(const v8::PropertyC
allbackInfo<v8::Value>& info) |
| 226 { |
| 227 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 228 v8SetReturnValueString(info, TestImplements::implementsReadonlyStringAttribu
te(imp), info.GetIsolate()); |
| 229 } |
| 230 |
| 231 static void implementsReadonlyStringAttributeAttributeGetterCallback(v8::Local<v
8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 232 { |
| 233 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 234 TestInterfacePythonImplementationV8Internal::implementsReadonlyStringAttribu
teAttributeGetter(info); |
| 235 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 236 } |
| 237 |
| 238 static void implementsStringAttributeAttributeGetter(const v8::PropertyCallbackI
nfo<v8::Value>& info) |
| 239 { |
| 240 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 241 v8SetReturnValueString(info, TestImplements::implementsStringAttribute(imp),
info.GetIsolate()); |
| 242 } |
| 243 |
| 244 static void implementsStringAttributeAttributeGetterCallback(v8::Local<v8::Strin
g>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 245 { |
| 246 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 247 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib
uteGetter(info); |
| 248 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 249 } |
| 250 |
| 251 static void implementsStringAttributeAttributeSetter(v8::Local<v8::Value> jsValu
e, const v8::PropertyCallbackInfo<void>& info) |
| 252 { |
| 253 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 254 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue); |
| 255 TestImplements::setImplementsStringAttribute(imp, cppValue); |
| 256 } |
| 257 |
| 258 static void implementsStringAttributeAttributeSetterCallback(v8::Local<v8::Strin
g>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 259 { |
| 260 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 261 TestInterfacePythonImplementationV8Internal::implementsStringAttributeAttrib
uteSetter(jsValue, info); |
| 262 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 263 } |
| 264 |
| 265 static void implementsNodeAttributeAttributeGetter(const v8::PropertyCallbackInf
o<v8::Value>& info) |
| 266 { |
| 267 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 268 v8SetReturnValueFast(info, TestImplements::implementsNodeAttribute(imp), imp
); |
| 269 } |
| 270 |
| 271 static void implementsNodeAttributeAttributeGetterCallback(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 272 { |
| 273 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 274 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut
eGetter(info); |
| 275 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 276 } |
| 277 |
| 278 static void implementsNodeAttributeAttributeSetter(v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<void>& info) |
| 279 { |
| 280 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 281 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); |
| 282 TestImplements::setImplementsNodeAttribute(imp, WTF::getPtr(cppValue)); |
| 283 } |
| 284 |
| 285 static void implementsNodeAttributeAttributeSetterCallback(v8::Local<v8::String>
, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 286 { |
| 287 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 288 TestInterfacePythonImplementationV8Internal::implementsNodeAttributeAttribut
eSetter(jsValue, info); |
| 289 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 290 } |
| 291 |
| 292 static void implementsEventHandlerAttributeAttributeGetter(const v8::PropertyCal
lbackInfo<v8::Value>& info) |
| 293 { |
| 294 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 295 EventListener* jsValue = TestImplements::implementsEventHandlerAttribute(imp
, isolatedWorldForIsolate(info.GetIsolate())); |
| 296 v8SetReturnValue(info, jsValue ? v8::Handle<v8::Value>(V8AbstractEventListen
er::cast(jsValue)->getListenerObject(imp->executionContext())) : v8::Handle<v8::
Value>(v8::Null(info.GetIsolate()))); |
| 297 } |
| 298 |
| 299 static void implementsEventHandlerAttributeAttributeGetterCallback(v8::Local<v8:
:String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 300 { |
| 301 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 302 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute
AttributeGetter(info); |
| 303 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 304 } |
| 305 |
| 306 static void implementsEventHandlerAttributeAttributeSetter(v8::Local<v8::Value>
jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 307 { |
| 308 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 309 transferHiddenDependency(info.Holder(), TestImplements::implementsEventHandl
erAttribute(imp, isolatedWorldForIsolate(info.GetIsolate())), jsValue, V8TestInt
erfacePython::eventListenerCacheIndex, info.GetIsolate()); |
| 310 TestImplements::setImplementsEventHandlerAttribute(imp, V8EventListenerList:
:getEventListener(jsValue, true, ListenerFindOrCreate), isolatedWorldForIsolate(
info.GetIsolate())); |
| 311 } |
| 312 |
| 313 static void implementsEventHandlerAttributeAttributeSetterCallback(v8::Local<v8:
:String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& in
fo) |
| 314 { |
| 315 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 316 TestInterfacePythonImplementationV8Internal::implementsEventHandlerAttribute
AttributeSetter(jsValue, info); |
| 317 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 318 } |
| 319 |
| 320 static void implementsRuntimeEnabledNodeAttributeAttributeGetter(const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
| 321 { |
| 322 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 323 v8SetReturnValueFast(info, TestImplements::implementsRuntimeEnabledNodeAttri
bute(imp), imp); |
| 324 } |
| 325 |
| 326 static void implementsRuntimeEnabledNodeAttributeAttributeGetterCallback(v8::Loc
al<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 327 { |
| 328 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); |
| 329 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt
ributeAttributeGetter(info); |
| 330 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 331 } |
| 332 |
| 333 static void implementsRuntimeEnabledNodeAttributeAttributeSetter(v8::Local<v8::V
alue> jsValue, const v8::PropertyCallbackInfo<void>& info) |
| 334 { |
| 335 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 336 V8TRYCATCH_VOID(Node*, cppValue, V8Node::hasInstance(jsValue, info.GetIsolat
e(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Ca
st(jsValue)) : 0); |
| 337 TestImplements::setImplementsRuntimeEnabledNodeAttribute(imp, WTF::getPtr(cp
pValue)); |
| 338 } |
| 339 |
| 340 static void implementsRuntimeEnabledNodeAttributeAttributeSetterCallback(v8::Loc
al<v8::String>, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<voi
d>& info) |
| 341 { |
| 342 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); |
| 343 TestInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAtt
ributeAttributeSetter(jsValue, info); |
| 344 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 345 } |
| 346 |
| 183 #if ENABLE(PARTIAL_CONDITION) | 347 #if ENABLE(PARTIAL_CONDITION) |
| 184 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) | 348 static void partialLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v
8::Value>& info) |
| 185 { | 349 { |
| 186 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); | 350 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 187 v8SetReturnValueInt(info, TestPartialInterfacePython::partialLongAttribute(i
mp)); | 351 v8SetReturnValueInt(info, TestPartialInterfacePython::partialLongAttribute(i
mp)); |
| 188 } | 352 } |
| 189 #endif // ENABLE(PARTIAL_CONDITION) | 353 #endif // ENABLE(PARTIAL_CONDITION) |
| 190 | 354 |
| 191 #if ENABLE(PARTIAL_CONDITION) | 355 #if ENABLE(PARTIAL_CONDITION) |
| 192 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) | 356 static void partialLongAttributeAttributeGetterCallback(v8::Local<v8::String>, c
onst v8::PropertyCallbackInfo<v8::Value>& info) |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 imp->voidMethod(); | 471 imp->voidMethod(); |
| 308 } | 472 } |
| 309 | 473 |
| 310 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<
v8::Value>& info) | 474 static void voidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<
v8::Value>& info) |
| 311 { | 475 { |
| 312 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 476 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 313 TestInterfacePythonImplementationV8Internal::voidMethodMethodForMainWorld(in
fo); | 477 TestInterfacePythonImplementationV8Internal::voidMethodMethodForMainWorld(in
fo); |
| 314 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 478 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 315 } | 479 } |
| 316 | 480 |
| 481 static void implementsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>
& info) |
| 482 { |
| 483 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 484 TestImplements::implementsVoidMethod(imp); |
| 485 } |
| 486 |
| 487 static void implementsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8
::Value>& info) |
| 488 { |
| 489 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 490 TestInterfacePythonImplementationV8Internal::implementsVoidMethodMethod(info
); |
| 491 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 492 } |
| 493 |
| 494 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val
ue>& info) |
| 495 { |
| 496 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC
omplexMethod", "TestInterfacePython", info.Holder(), info.GetIsolate()); |
| 497 if (UNLIKELY(info.Length() < 2)) { |
| 498 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i
nfo.Length())); |
| 499 exceptionState.throwIfNeeded(); |
| 500 return; |
| 501 } |
| 502 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 503 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); |
| 504 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE
mpty::hasInstance(info[1], info.GetIsolate(), worldType(info.GetIsolate())) ? V8
TestInterfaceEmpty::toNative(v8::Handle<v8::Object>::Cast(info[1])) : 0); |
| 505 ExecutionContext* scriptContext = getExecutionContext(); |
| 506 RefPtr<TestInterfaceEmpty> result = TestImplements::implementsComplexMethod(
scriptContext, imp, strArg, testInterfaceEmptyArg, exceptionState); |
| 507 if (exceptionState.throwIfNeeded()) |
| 508 return; |
| 509 v8SetReturnValue(info, result.release()); |
| 510 } |
| 511 |
| 512 static void implementsComplexMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 513 { |
| 514 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 515 TestInterfacePythonImplementationV8Internal::implementsComplexMethodMethod(i
nfo); |
| 516 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 517 } |
| 518 |
| 519 static void implementsCustomVoidMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 520 { |
| 521 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 522 V8TestInterfacePython::implementsCustomVoidMethodMethodCustom(info); |
| 523 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 524 } |
| 525 |
| 526 static void implementsStaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::
Value>& info) |
| 527 { |
| 528 TestImplements::implementsStaticVoidMethod(); |
| 529 } |
| 530 |
| 531 static void implementsStaticVoidMethodMethodCallback(const v8::FunctionCallbackI
nfo<v8::Value>& info) |
| 532 { |
| 533 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 534 TestInterfacePythonImplementationV8Internal::implementsStaticVoidMethodMetho
d(info); |
| 535 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 536 } |
| 537 |
| 317 #if ENABLE(PARTIAL_CONDITION) | 538 #if ENABLE(PARTIAL_CONDITION) |
| 318 static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 539 static void partialVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
| 319 { | 540 { |
| 320 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); | 541 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 321 TestPartialInterfacePython::partialVoidMethod(imp); | 542 TestPartialInterfacePython::partialVoidMethod(imp); |
| 322 } | 543 } |
| 323 #endif // ENABLE(PARTIAL_CONDITION) | 544 #endif // ENABLE(PARTIAL_CONDITION) |
| 324 | 545 |
| 325 #if ENABLE(PARTIAL_CONDITION) | 546 #if ENABLE(PARTIAL_CONDITION) |
| 326 static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 547 static void partialVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 341 #if ENABLE(PARTIAL_CONDITION) | 562 #if ENABLE(PARTIAL_CONDITION) |
| 342 static void partialStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) | 563 static void partialStaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 343 { | 564 { |
| 344 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 565 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 345 TestInterfacePythonImplementationV8Internal::partialStaticVoidMethodMethod(i
nfo); | 566 TestInterfacePythonImplementationV8Internal::partialStaticVoidMethodMethod(i
nfo); |
| 346 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 567 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 347 } | 568 } |
| 348 #endif // ENABLE(PARTIAL_CONDITION) | 569 #endif // ENABLE(PARTIAL_CONDITION) |
| 349 | 570 |
| 350 #if ENABLE(PARTIAL_CONDITION) | 571 #if ENABLE(PARTIAL_CONDITION) |
| 572 static void partialVoidMethodLongArgMethod(const v8::FunctionCallbackInfo<v8::Va
lue>& info) |
| 573 { |
| 574 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoid
MethodLongArg", "TestInterfacePython", info.Holder(), info.GetIsolate()); |
| 575 if (UNLIKELY(info.Length() < 1)) { |
| 576 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 577 exceptionState.throwIfNeeded(); |
| 578 return; |
| 579 } |
| 580 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 581 V8TRYCATCH_EXCEPTION_VOID(int, longArg, toInt32(info[0], exceptionState), ex
ceptionState); |
| 582 TestPartialInterfacePython::partialVoidMethodLongArg(imp, longArg); |
| 583 } |
| 584 #endif // ENABLE(PARTIAL_CONDITION) |
| 585 |
| 586 #if ENABLE(PARTIAL_CONDITION) |
| 587 static void partialVoidMethodLongArgMethodCallback(const v8::FunctionCallbackInf
o<v8::Value>& info) |
| 588 { |
| 589 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 590 TestInterfacePythonImplementationV8Internal::partialVoidMethodLongArgMethod(
info); |
| 591 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 592 } |
| 593 #endif // ENABLE(PARTIAL_CONDITION) |
| 594 |
| 595 #if ENABLE(PARTIAL_CONDITION) |
| 351 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) | 596 static void partialCallWithExecutionContextRaisesExceptionVoidMethodMethod(const
v8::FunctionCallbackInfo<v8::Value>& info) |
| 352 { | 597 { |
| 353 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall
WithExecutionContextRaisesExceptionVoidMethod", "TestInterfacePython", info.Hold
er(), info.GetIsolate()); | 598 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialCall
WithExecutionContextRaisesExceptionVoidMethod", "TestInterfacePython", info.Hold
er(), info.GetIsolate()); |
| 354 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); | 599 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf
o.Holder()); |
| 355 ExecutionContext* scriptContext = getExecutionContext(); | 600 ExecutionContext* scriptContext = getExecutionContext(); |
| 356 TestPartialInterfacePython::partialCallWithExecutionContextRaisesExceptionVo
idMethod(scriptContext, imp, exceptionState); | 601 TestPartialInterfacePython::partialCallWithExecutionContextRaisesExceptionVo
idMethod(scriptContext, imp, exceptionState); |
| 357 if (exceptionState.throwIfNeeded()) | 602 if (exceptionState.throwIfNeeded()) |
| 358 return; | 603 return; |
| 359 } | 604 } |
| 360 #endif // ENABLE(PARTIAL_CONDITION) | 605 #endif // ENABLE(PARTIAL_CONDITION) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 380 if (!DOMDataStore::containsWrapper<V8ReferencedType>(referencedName, iso
late)) | 625 if (!DOMDataStore::containsWrapper<V8ReferencedType>(referencedName, iso
late)) |
| 381 wrap(referencedName, creationContext, isolate); | 626 wrap(referencedName, creationContext, isolate); |
| 382 DOMDataStore::setWrapperReference<V8ReferencedType>(wrapper, referencedN
ame, isolate); | 627 DOMDataStore::setWrapperReference<V8ReferencedType>(wrapper, referencedN
ame, isolate); |
| 383 } | 628 } |
| 384 setObjectGroup(object, wrapper, isolate); | 629 setObjectGroup(object, wrapper, isolate); |
| 385 } | 630 } |
| 386 | 631 |
| 387 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfacePythonAtt
ributes[] = { | 632 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfacePythonAtt
ributes[] = { |
| 388 {"testInterfacePythonAttribute", TestInterfacePythonImplementationV8Internal
::testInterfacePythonAttributeAttributeGetterCallback, TestInterfacePythonImplem
entationV8Internal::testInterfacePythonAttributeAttributeSetterCallback, 0, 0, 0
, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute
>(v8::None), 0 /* on instance */}, | 633 {"testInterfacePythonAttribute", TestInterfacePythonImplementationV8Internal
::testInterfacePythonAttributeAttributeGetterCallback, TestInterfacePythonImplem
entationV8Internal::testInterfacePythonAttributeAttributeSetterCallback, 0, 0, 0
, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute
>(v8::None), 0 /* on instance */}, |
| 389 {"perWorldBindingsStringAttribute", TestInterfacePythonImplementationV8Inter
nal::perWorldBindingsStringAttributeAttributeGetterCallback, TestInterfacePython
ImplementationV8Internal::perWorldBindingsStringAttributeAttributeSetterCallback
, TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAt
tributeGetterCallbackForMainWorld, TestInterfacePythonImplementationV8Internal::
perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, 0 /* on instance */}, | 634 {"perWorldBindingsStringAttribute", TestInterfacePythonImplementationV8Inter
nal::perWorldBindingsStringAttributeAttributeGetterCallback, TestInterfacePython
ImplementationV8Internal::perWorldBindingsStringAttributeAttributeSetterCallback
, TestInterfacePythonImplementationV8Internal::perWorldBindingsStringAttributeAt
tributeGetterCallbackForMainWorld, TestInterfacePythonImplementationV8Internal::
perWorldBindingsStringAttributeAttributeSetterCallbackForMainWorld, 0, static_ca
st<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None)
, 0 /* on instance */}, |
| 635 {"implementsReadonlyStringAttribute", TestInterfacePythonImplementationV8Int
ernal::implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, 0, sta
tic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8:
:None), 0 /* on instance */}, |
| 636 {"implementsStringAttribute", TestInterfacePythonImplementationV8Internal::i
mplementsStringAttributeAttributeGetterCallback, TestInterfacePythonImplementati
onV8Internal::implementsStringAttributeAttributeSetterCallback, 0, 0, 0, static_
cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::Non
e), 0 /* on instance */}, |
| 637 {"implementsNodeAttribute", TestInterfacePythonImplementationV8Internal::imp
lementsNodeAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8
Internal::implementsNodeAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v
8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0
/* on instance */}, |
| 638 {"implementsEventHandlerAttribute", TestInterfacePythonImplementationV8Inter
nal::implementsEventHandlerAttributeAttributeGetterCallback, TestInterfacePython
ImplementationV8Internal::implementsEventHandlerAttributeAttributeSetterCallback
, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Property
Attribute>(v8::None), 0 /* on instance */}, |
| 390 }; | 639 }; |
| 391 | 640 |
| 392 static const V8DOMConfiguration::MethodConfiguration V8TestInterfacePythonMethod
s[] = { | 641 static const V8DOMConfiguration::MethodConfiguration V8TestInterfacePythonMethod
s[] = { |
| 393 {"voidMethod", TestInterfacePythonImplementationV8Internal::voidMethodMethod
Callback, TestInterfacePythonImplementationV8Internal::voidMethodMethodCallbackF
orMainWorld, 0}, | 642 {"voidMethod", TestInterfacePythonImplementationV8Internal::voidMethodMethod
Callback, TestInterfacePythonImplementationV8Internal::voidMethodMethodCallbackF
orMainWorld, 0}, |
| 643 {"implementsVoidMethod", TestInterfacePythonImplementationV8Internal::implem
entsVoidMethodMethodCallback, 0, 0}, |
| 644 {"implementsComplexMethod", TestInterfacePythonImplementationV8Internal::imp
lementsComplexMethodMethodCallback, 0, 2}, |
| 645 {"implementsCustomVoidMethod", TestInterfacePythonImplementationV8Internal::
implementsCustomVoidMethodMethodCallback, 0, 0}, |
| 394 }; | 646 }; |
| 395 | 647 |
| 396 static void configureV8TestInterfacePythonTemplate(v8::Handle<v8::FunctionTempla
te> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType) | 648 static void configureV8TestInterfacePythonTemplate(v8::Handle<v8::FunctionTempla
te> functionTemplate, v8::Isolate* isolate, WrapperWorldType currentWorldType) |
| 397 { | 649 { |
| 398 functionTemplate->ReadOnlyPrototype(); | 650 functionTemplate->ReadOnlyPrototype(); |
| 399 | 651 |
| 400 v8::Local<v8::Signature> defaultSignature; | 652 v8::Local<v8::Signature> defaultSignature; |
| 401 if (!RuntimeEnabledFeatures::featureNameEnabled()) | 653 if (!RuntimeEnabledFeatures::featureNameEnabled()) |
| 402 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT
emplate, "", V8TestInterfaceEmpty::domTemplate(isolate, currentWorldType), V8Tes
tInterfacePython::internalFieldCount, 0, 0, 0, 0, 0, 0, isolate, currentWorldTyp
e); | 654 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT
emplate, "", V8TestInterfaceEmpty::domTemplate(isolate, currentWorldType), V8Tes
tInterfacePython::internalFieldCount, 0, 0, 0, 0, 0, 0, isolate, currentWorldTyp
e); |
| 403 else | 655 else |
| 404 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT
emplate, "TestInterfacePython", V8TestInterfaceEmpty::domTemplate(isolate, curre
ntWorldType), V8TestInterfacePython::internalFieldCount, | 656 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionT
emplate, "TestInterfacePython", V8TestInterfaceEmpty::domTemplate(isolate, curre
ntWorldType), V8TestInterfacePython::internalFieldCount, |
| 405 V8TestInterfacePythonAttributes, WTF_ARRAY_LENGTH(V8TestInterfacePyt
honAttributes), | 657 V8TestInterfacePythonAttributes, WTF_ARRAY_LENGTH(V8TestInterfacePyt
honAttributes), |
| 406 0, 0, | 658 0, 0, |
| 407 V8TestInterfacePythonMethods, WTF_ARRAY_LENGTH(V8TestInterfacePython
Methods), | 659 V8TestInterfacePythonMethods, WTF_ARRAY_LENGTH(V8TestInterfacePython
Methods), |
| 408 isolate, currentWorldType); | 660 isolate, currentWorldType); |
| 409 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); | 661 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); |
| 410 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); | 662 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); |
| 663 if (RuntimeEnabledFeatures::implementsFeatureNameEnabled()) { |
| 664 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 665 {"implementsRuntimeEnabledNodeAttribute", TestInterfacePythonImplementat
ionV8Internal::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, Tes
tInterfacePythonImplementationV8Internal::implementsRuntimeEnabledNodeAttributeA
ttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), st
atic_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}; |
| 666 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate, currentWorldType); |
| 667 } |
| 411 #if ENABLE(PARTIAL_CONDITION) | 668 #if ENABLE(PARTIAL_CONDITION) |
| 412 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { | 669 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
| 413 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | 670 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 414 {"partialLongAttribute", TestInterfacePythonImplementationV8Internal::pa
rtialLongAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8In
ternal::partialLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Ac
cessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on
instance */}; | 671 {"partialLongAttribute", TestInterfacePythonImplementationV8Internal::pa
rtialLongAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8In
ternal::partialLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::Ac
cessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on
instance */}; |
| 415 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate, currentWorldType); | 672 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate, currentWorldType); |
| 416 } | 673 } |
| 417 #endif // ENABLE(PARTIAL_CONDITION) | 674 #endif // ENABLE(PARTIAL_CONDITION) |
| 418 #if ENABLE(PARTIAL_CONDITION) | 675 #if ENABLE(PARTIAL_CONDITION) |
| 419 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { | 676 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
| 420 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | 677 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
| 421 {"partialCallWithExecutionContextLongAttribute", TestInterfacePythonImpl
ementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeGette
rCallback, TestInterfacePythonImplementationV8Internal::partialCallWithExecution
ContextLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc
e */}; | 678 {"partialCallWithExecutionContextLongAttribute", TestInterfacePythonImpl
ementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeGette
rCallback, TestInterfacePythonImplementationV8Internal::partialCallWithExecution
ContextLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instanc
e */}; |
| 422 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate, currentWorldType); | 679 V8DOMConfiguration::installAttribute(instanceTemplate, prototypeTemplate
, attributeConfiguration, isolate, currentWorldType); |
| 423 } | 680 } |
| 424 #endif // ENABLE(PARTIAL_CONDITION) | 681 #endif // ENABLE(PARTIAL_CONDITION) |
| 425 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfacePython
Constants[] = { | 682 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfacePython
Constants[] = { |
| 426 {"UNSIGNED_LONG", 0}, | 683 {"UNSIGNED_LONG", 0}, |
| 684 {"IMPLEMENTS_CONSTANT_1", 1}, |
| 685 {"IMPLEMENTS_CONSTANT_2", 2}, |
| 427 }; | 686 }; |
| 428 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestInterfacePythonConstants, WTF_ARRAY_LENGTH(V8TestInterfacePythonConstants),
isolate); | 687 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestInterfacePythonConstants, WTF_ARRAY_LENGTH(V8TestInterfacePythonConstants),
isolate); |
| 429 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { | 688 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { |
| 430 static const V8DOMConfiguration::ConstantConfiguration constantConfigura
tion = {"PARTIAL_UNSIGNED_SHORT", static_cast<signed int>(0)}; | 689 static const V8DOMConfiguration::ConstantConfiguration constantConfigura
tion = {"PARTIAL_UNSIGNED_SHORT", static_cast<signed int>(0)}; |
| 431 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate
, &constantConfiguration, 1, isolate); | 690 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate
, &constantConfiguration, 1, isolate); |
| 432 } | 691 } |
| 433 COMPILE_ASSERT(0 == TestInterfacePythonImplementation::UNSIGNED_LONG, TheVal
ueOfTestInterfacePythonImplementation_UNSIGNED_LONGDoesntMatchWithImplementation
); | 692 COMPILE_ASSERT(0 == TestInterfacePythonImplementation::UNSIGNED_LONG, TheVal
ueOfTestInterfacePythonImplementation_UNSIGNED_LONGDoesntMatchWithImplementation
); |
| 693 COMPILE_ASSERT(1 == TestImplements::IMPLEMENTS_CONSTANT_1, TheValueOfTestInt
erfacePythonImplementation_IMPLEMENTS_CONSTANT_1DoesntMatchWithImplementation); |
| 694 COMPILE_ASSERT(2 == TestImplements::IMPLEMENTS_REFLECT_CONSTANT, TheValueOfT
estInterfacePythonImplementation_IMPLEMENTS_REFLECT_CONSTANTDoesntMatchWithImple
mentation); |
| 434 COMPILE_ASSERT(0 == TestPartialInterfacePython::PARTIAL_UNSIGNED_SHORT, TheV
alueOfTestInterfacePythonImplementation_PARTIAL_UNSIGNED_SHORTDoesntMatchWithImp
lementation); | 695 COMPILE_ASSERT(0 == TestPartialInterfacePython::PARTIAL_UNSIGNED_SHORT, TheV
alueOfTestInterfacePythonImplementation_PARTIAL_UNSIGNED_SHORTDoesntMatchWithImp
lementation); |
| 435 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa
cePython::legacyCallCustom); | 696 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa
cePython::legacyCallCustom); |
| 697 functionTemplate->Set(v8AtomicString(isolate, "implementsStaticVoidMethod"),
v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal:
:implementsStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signatur
e>(), 0)); |
| 436 #if ENABLE(PARTIAL_CONDITION) | 698 #if ENABLE(PARTIAL_CONDITION) |
| 437 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) | 699 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) |
| 438 prototypeTemplate->Set(v8AtomicString(isolate, "partialVoidMethod"), v8:
:FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal::par
tialVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)); | 700 prototypeTemplate->Set(v8AtomicString(isolate, "partialVoidMethod"), v8:
:FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal::par
tialVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)); |
| 439 #endif // ENABLE(PARTIAL_CONDITION) | 701 #endif // ENABLE(PARTIAL_CONDITION) |
| 440 #if ENABLE(PARTIAL_CONDITION) | 702 #if ENABLE(PARTIAL_CONDITION) |
| 441 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) | 703 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) |
| 442 functionTemplate->Set(v8AtomicString(isolate, "partialStaticVoidMethod")
, v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal
::partialStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>
(), 0)); | 704 functionTemplate->Set(v8AtomicString(isolate, "partialStaticVoidMethod")
, v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Internal
::partialStaticVoidMethodMethodCallback, v8Undefined(), v8::Local<v8::Signature>
(), 0)); |
| 443 #endif // ENABLE(PARTIAL_CONDITION) | 705 #endif // ENABLE(PARTIAL_CONDITION) |
| 444 #if ENABLE(PARTIAL_CONDITION) | 706 #if ENABLE(PARTIAL_CONDITION) |
| 445 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) | 707 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) |
| 708 prototypeTemplate->Set(v8AtomicString(isolate, "partialVoidMethodLongArg
"), v8::FunctionTemplate::New(isolate, TestInterfacePythonImplementationV8Intern
al::partialVoidMethodLongArgMethodCallback, v8Undefined(), defaultSignature, 1))
; |
| 709 #endif // ENABLE(PARTIAL_CONDITION) |
| 710 #if ENABLE(PARTIAL_CONDITION) |
| 711 if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) |
| 446 prototypeTemplate->Set(v8AtomicString(isolate, "partialCallWithExecution
ContextRaisesExceptionVoidMethod"), v8::FunctionTemplate::New(isolate, TestInter
facePythonImplementationV8Internal::partialCallWithExecutionContextRaisesExcepti
onVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)); | 712 prototypeTemplate->Set(v8AtomicString(isolate, "partialCallWithExecution
ContextRaisesExceptionVoidMethod"), v8::FunctionTemplate::New(isolate, TestInter
facePythonImplementationV8Internal::partialCallWithExecutionContextRaisesExcepti
onVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0)); |
| 447 #endif // ENABLE(PARTIAL_CONDITION) | 713 #endif // ENABLE(PARTIAL_CONDITION) |
| 448 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin
gAttribute"), TestInterfacePythonImplementationV8Internal::staticStringAttribute
AttributeGetterCallback, TestInterfacePythonImplementationV8Internal::staticStri
ngAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v
8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cas
t<v8::AccessControl>(v8::DEFAULT)); | 714 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin
gAttribute"), TestInterfacePythonImplementationV8Internal::staticStringAttribute
AttributeGetterCallback, TestInterfacePythonImplementationV8Internal::staticStri
ngAttributeAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v
8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cas
t<v8::AccessControl>(v8::DEFAULT)); |
| 715 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS
taticReadOnlyLongAttribute"), TestInterfacePythonImplementationV8Internal::imple
mentsStaticReadOnlyLongAttributeAttributeGetterCallback, 0, v8::External::New(is
olate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Accessor
Signature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
| 716 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS
taticStringAttribute"), TestInterfacePythonImplementationV8Internal::implementsS
taticStringAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8
Internal::implementsStaticStringAttributeAttributeSetterCallback, v8::External::
New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Ac
cessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
| 449 #if ENABLE(PARTIAL_CONDITION) | 717 #if ENABLE(PARTIAL_CONDITION) |
| 450 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "partialStat
icLongAttribute"), TestInterfacePythonImplementationV8Internal::partialStaticLon
gAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::
partialStaticLongAttributeAttributeSetterCallback, v8::External::New(isolate, 0)
, static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature
>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 718 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "partialStat
icLongAttribute"), TestInterfacePythonImplementationV8Internal::partialStaticLon
gAttributeAttributeGetterCallback, TestInterfacePythonImplementationV8Internal::
partialStaticLongAttributeAttributeSetterCallback, v8::External::New(isolate, 0)
, static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature
>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
| 451 #endif // ENABLE(PARTIAL_CONDITION) | 719 #endif // ENABLE(PARTIAL_CONDITION) |
| 452 | 720 |
| 453 // Custom toString template | 721 // Custom toString template |
| 454 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:current()->toStringTemplate()); | 722 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:current()->toStringTemplate()); |
| 455 } | 723 } |
| 456 | 724 |
| 457 v8::Handle<v8::FunctionTemplate> V8TestInterfacePython::domTemplate(v8::Isolate*
isolate, WrapperWorldType currentWorldType) | 725 v8::Handle<v8::FunctionTemplate> V8TestInterfacePython::domTemplate(v8::Isolate*
isolate, WrapperWorldType currentWorldType) |
| 458 { | 726 { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 } | 760 } |
| 493 | 761 |
| 494 template<> | 762 template<> |
| 495 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) | 763 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8::
Handle<v8::Object> creationContext, v8::Isolate* isolate) |
| 496 { | 764 { |
| 497 return toV8(impl, creationContext, isolate); | 765 return toV8(impl, creationContext, isolate); |
| 498 } | 766 } |
| 499 | 767 |
| 500 } // namespace WebCore | 768 } // namespace WebCore |
| 501 #endif // ENABLE(CONDITION) | 769 #endif // ENABLE(CONDITION) |
| OLD | NEW |