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 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
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 #include "V8TestTypedefs.h" | 34 #include "V8TestTypedefs.h" |
35 | 35 |
36 #include "RuntimeEnabledFeatures.h" | 36 #include "RuntimeEnabledFeatures.h" |
37 #include "V8SVGPoint.h" | |
38 #include "V8SerializedScriptValue.h" | 37 #include "V8SerializedScriptValue.h" |
39 #include "V8TestCallbackInterface.h" | 38 #include "V8TestCallbackInterface.h" |
40 #include "V8TestSubObj.h" | 39 #include "V8TestSubObj.h" |
41 #include "bindings/v8/ExceptionState.h" | 40 #include "bindings/v8/ExceptionState.h" |
42 #include "bindings/v8/SerializedScriptValue.h" | 41 #include "bindings/v8/SerializedScriptValue.h" |
43 #include "bindings/v8/V8DOMConfiguration.h" | 42 #include "bindings/v8/V8DOMConfiguration.h" |
44 #include "bindings/v8/V8ObjectConstructor.h" | 43 #include "bindings/v8/V8ObjectConstructor.h" |
45 #include "core/dom/ContextFeatures.h" | 44 #include "core/dom/ContextFeatures.h" |
46 #include "core/dom/Document.h" | 45 #include "core/dom/Document.h" |
47 #include "core/svg/properties/SVGPropertyTearOff.h" | |
48 #include "platform/TraceEvent.h" | 46 #include "platform/TraceEvent.h" |
49 | 47 |
50 namespace WebCore { | 48 namespace WebCore { |
51 | 49 |
52 static void initializeScriptWrappableForInterface(TestTypedefs* object) | 50 static void initializeScriptWrappableForInterface(TestTypedefs* object) |
53 { | 51 { |
54 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 52 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
55 ScriptWrappable::setTypeInfoInObject(object, &V8TestTypedefs::wrapperTyp
eInfo); | 53 ScriptWrappable::setTypeInfoInObject(object, &V8TestTypedefs::wrapperTyp
eInfo); |
56 else | 54 else |
57 ASSERT_NOT_REACHED(); | 55 ASSERT_NOT_REACHED(); |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 imp->setShadow(width, height, blur, color, alpha); | 310 imp->setShadow(width, height, blur, color, alpha); |
313 } | 311 } |
314 | 312 |
315 static void setShadowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) | 313 static void setShadowMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& i
nfo) |
316 { | 314 { |
317 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 315 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
318 TestTypedefsV8Internal::setShadowMethod(info); | 316 TestTypedefsV8Internal::setShadowMethod(info); |
319 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 317 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
320 } | 318 } |
321 | 319 |
| 320 static void voidMethodTestCallbackInterfaceArgumentMethod(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 321 { |
| 322 if (UNLIKELY(info.Length() < 1)) { |
| 323 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbac
kInterfaceArgument", "TestTypedefs", ExceptionMessages::notEnoughArguments(1, in
fo.Length())), info.GetIsolate()); |
| 324 return; |
| 325 } |
| 326 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder()); |
| 327 if (info.Length() <= 0 || !info[0]->IsFunction()) { |
| 328 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestCallbac
kInterfaceArgument", "TestTypedefs", "The callback provided as parameter 1 is no
t a function."), info.GetIsolate()); |
| 329 return; |
| 330 } |
| 331 OwnPtr<TestCallbackInterface> testCallbackInterface = V8TestCallbackInterfac
e::create(v8::Handle<v8::Function>::Cast(info[0]), getExecutionContext()); |
| 332 imp->voidMethodTestCallbackInterfaceArgument(testCallbackInterface.release()
); |
| 333 } |
| 334 |
| 335 static void voidMethodTestCallbackInterfaceArgumentMethodCallback(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 336 { |
| 337 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
| 338 TestTypedefsV8Internal::voidMethodTestCallbackInterfaceArgumentMethod(info); |
| 339 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
| 340 } |
| 341 |
322 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) | 342 static void methodWithSequenceArgMethod(const v8::FunctionCallbackInfo<v8::Value
>& info) |
323 { | 343 { |
324 if (UNLIKELY(info.Length() < 1)) { | 344 if (UNLIKELY(info.Length() < 1)) { |
325 throwTypeError(ExceptionMessages::failedToExecute("methodWithSequenceArg
", "TestTypedefs", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); | 345 throwTypeError(ExceptionMessages::failedToExecute("methodWithSequenceArg
", "TestTypedefs", ExceptionMessages::notEnoughArguments(1, info.Length())), inf
o.GetIsolate()); |
326 return; | 346 return; |
327 } | 347 } |
328 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder()); | 348 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder()); |
329 V8TRYCATCH_VOID(Vector<RefPtr<SerializedScriptValue> >, sequenceArg, (toRefP
trNativeArray<SerializedScriptValue, V8SerializedScriptValue>(info[0], 1, info.G
etIsolate()))); | 349 V8TRYCATCH_VOID(Vector<RefPtr<SerializedScriptValue> >, sequenceArg, (toRefP
trNativeArray<SerializedScriptValue, V8SerializedScriptValue>(info[0], 1, info.G
etIsolate()))); |
330 v8SetReturnValue(info, static_cast<double>(imp->methodWithSequenceArg(sequen
ceArg))); | 350 v8SetReturnValue(info, static_cast<double>(imp->methodWithSequenceArg(sequen
ceArg))); |
331 } | 351 } |
332 | 352 |
333 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) | 353 static void methodWithSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v
8::Value>& info) |
334 { | 354 { |
335 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 355 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
336 TestTypedefsV8Internal::methodWithSequenceArgMethod(info); | 356 TestTypedefsV8Internal::methodWithSequenceArgMethod(info); |
337 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 357 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
338 } | 358 } |
339 | 359 |
340 static void nullableArrayArgMethod(const v8::FunctionCallbackInfo<v8::Value>& in
fo) | |
341 { | |
342 if (UNLIKELY(info.Length() < 1)) { | |
343 throwTypeError(ExceptionMessages::failedToExecute("nullableArrayArg", "T
estTypedefs", ExceptionMessages::notEnoughArguments(1, info.Length())), info.Get
Isolate()); | |
344 return; | |
345 } | |
346 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder()); | |
347 bool arrayArgIsNull = info[0]->IsNull(); | |
348 V8TRYCATCH_VOID(Vector<String>, arrayArg, toNativeArray<String>(info[0], 1,
info.GetIsolate())); | |
349 imp->nullableArrayArg(arrayArgIsNull ? 0 : &arrayArg); | |
350 } | |
351 | |
352 static void nullableArrayArgMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) | |
353 { | |
354 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
355 TestTypedefsV8Internal::nullableArrayArgMethod(info); | |
356 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | |
357 } | |
358 | |
359 static void immutablePointFunctionMethod(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | |
360 { | |
361 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder()); | |
362 v8SetReturnValue(info, WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(imp-
>immutablePointFunction()))); | |
363 } | |
364 | |
365 static void immutablePointFunctionMethodCallback(const v8::FunctionCallbackInfo<
v8::Value>& info) | |
366 { | |
367 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | |
368 TestTypedefsV8Internal::immutablePointFunctionMethod(info); | |
369 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | |
370 } | |
371 | |
372 static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) | 360 static void stringArrayFunctionMethod(const v8::FunctionCallbackInfo<v8::Value>&
info) |
373 { | 361 { |
374 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringArray
Function", "TestTypedefs", info.Holder(), info.GetIsolate()); | 362 ExceptionState exceptionState(ExceptionState::ExecutionContext, "stringArray
Function", "TestTypedefs", info.Holder(), info.GetIsolate()); |
375 if (UNLIKELY(info.Length() < 1)) { | 363 if (UNLIKELY(info.Length() < 1)) { |
376 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); | 364 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
377 exceptionState.throwIfNeeded(); | 365 exceptionState.throwIfNeeded(); |
378 return; | 366 return; |
379 } | 367 } |
380 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder()); | 368 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder()); |
381 V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(info[0], 1, in
fo.GetIsolate())); | 369 V8TRYCATCH_VOID(Vector<String>, values, toNativeArray<String>(info[0], 1, in
fo.GetIsolate())); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 | 414 |
427 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) | 415 static void methodWithExceptionMethodCallback(const v8::FunctionCallbackInfo<v8:
:Value>& info) |
428 { | 416 { |
429 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); | 417 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); |
430 TestTypedefsV8Internal::methodWithExceptionMethod(info); | 418 TestTypedefsV8Internal::methodWithExceptionMethod(info); |
431 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); | 419 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); |
432 } | 420 } |
433 | 421 |
434 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) | 422 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) |
435 { | 423 { |
436 if (UNLIKELY(info.Length() < 2)) { | 424 if (UNLIKELY(info.Length() < 1)) { |
437 throwTypeError(ExceptionMessages::failedToConstruct("TestTypedefs", Exce
ptionMessages::notEnoughArguments(2, info.Length())), info.GetIsolate()); | 425 throwTypeError(ExceptionMessages::failedToConstruct("TestTypedefs", Exce
ptionMessages::notEnoughArguments(1, info.Length())), info.GetIsolate()); |
438 return; | 426 return; |
439 } | 427 } |
440 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, hello, info[0]); | 428 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, hello, info[0]); |
441 if (info.Length() <= 1 || !info[1]->IsFunction()) { | 429 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello); |
442 throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestTy
pedefs", "The callback provided as parameter 2 is not a function."), info.GetIso
late()); | |
443 return; | |
444 } | |
445 OwnPtr<TestCallbackInterface> testCallbackInterface = V8TestCallbackInterfac
e::create(v8::Handle<v8::Function>::Cast(info[1]), getExecutionContext()); | |
446 RefPtr<TestTypedefs> impl = TestTypedefs::create(hello, testCallbackInterfac
e); | |
447 v8::Handle<v8::Object> wrapper = info.Holder(); | 430 v8::Handle<v8::Object> wrapper = info.Holder(); |
448 | 431 |
449 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8
TestTypedefs::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration:
:Dependent); | 432 V8DOMWrapper::associateObjectWithWrapper<V8TestTypedefs>(impl.release(), &V8
TestTypedefs::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguration:
:Dependent); |
450 v8SetReturnValue(info, wrapper); | 433 v8SetReturnValue(info, wrapper); |
451 } | 434 } |
452 | 435 |
453 } // namespace TestTypedefsV8Internal | 436 } // namespace TestTypedefsV8Internal |
454 | 437 |
455 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes
[] = { | 438 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes
[] = { |
456 {"unsignedLongLongAttr", TestTypedefsV8Internal::unsignedLongLongAttrAttribu
teGetterCallback, TestTypedefsV8Internal::unsignedLongLongAttrAttributeSetterCal
lback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pro
pertyAttribute>(v8::None), 0 /* on instance */}, | 439 {"unsignedLongLongAttr", TestTypedefsV8Internal::unsignedLongLongAttrAttribu
teGetterCallback, TestTypedefsV8Internal::unsignedLongLongAttrAttributeSetterCal
lback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::Pro
pertyAttribute>(v8::None), 0 /* on instance */}, |
457 {"immutableSerializedScriptValue", TestTypedefsV8Internal::immutableSerializ
edScriptValueAttributeGetterCallback, TestTypedefsV8Internal::immutableSerialize
dScriptValueAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:
:DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 440 {"immutableSerializedScriptValue", TestTypedefsV8Internal::immutableSerializ
edScriptValueAttributeGetterCallback, TestTypedefsV8Internal::immutableSerialize
dScriptValueAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8:
:DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
458 {"attrWithGetterException", TestTypedefsV8Internal::attrWithGetterExceptionA
ttributeGetterCallback, TestTypedefsV8Internal::attrWithGetterExceptionAttribute
SetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cas
t<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 441 {"attrWithGetterException", TestTypedefsV8Internal::attrWithGetterExceptionA
ttributeGetterCallback, TestTypedefsV8Internal::attrWithGetterExceptionAttribute
SetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cas
t<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
459 {"attrWithSetterException", TestTypedefsV8Internal::attrWithSetterExceptionA
ttributeGetterCallback, TestTypedefsV8Internal::attrWithSetterExceptionAttribute
SetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cas
t<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 442 {"attrWithSetterException", TestTypedefsV8Internal::attrWithSetterExceptionA
ttributeGetterCallback, TestTypedefsV8Internal::attrWithSetterExceptionAttribute
SetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cas
t<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
460 {"stringAttrWithGetterException", TestTypedefsV8Internal::stringAttrWithGett
erExceptionAttributeGetterCallback, TestTypedefsV8Internal::stringAttrWithGetter
ExceptionAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DE
FAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 443 {"stringAttrWithGetterException", TestTypedefsV8Internal::stringAttrWithGett
erExceptionAttributeGetterCallback, TestTypedefsV8Internal::stringAttrWithGetter
ExceptionAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DE
FAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
461 {"stringAttrWithSetterException", TestTypedefsV8Internal::stringAttrWithSett
erExceptionAttributeGetterCallback, TestTypedefsV8Internal::stringAttrWithSetter
ExceptionAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DE
FAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, | 444 {"stringAttrWithSetterException", TestTypedefsV8Internal::stringAttrWithSett
erExceptionAttributeGetterCallback, TestTypedefsV8Internal::stringAttrWithSetter
ExceptionAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DE
FAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */}, |
462 }; | 445 }; |
463 | 446 |
464 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = { | 447 static const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = { |
465 {"func", TestTypedefsV8Internal::funcMethodCallback, 0, 0}, | 448 {"func", TestTypedefsV8Internal::funcMethodCallback, 0, 0}, |
466 {"setShadow", TestTypedefsV8Internal::setShadowMethodCallback, 0, 3}, | 449 {"setShadow", TestTypedefsV8Internal::setShadowMethodCallback, 0, 3}, |
| 450 {"voidMethodTestCallbackInterfaceArgument", TestTypedefsV8Internal::voidMeth
odTestCallbackInterfaceArgumentMethodCallback, 0, 1}, |
467 {"methodWithSequenceArg", TestTypedefsV8Internal::methodWithSequenceArgMetho
dCallback, 0, 1}, | 451 {"methodWithSequenceArg", TestTypedefsV8Internal::methodWithSequenceArgMetho
dCallback, 0, 1}, |
468 {"nullableArrayArg", TestTypedefsV8Internal::nullableArrayArgMethodCallback,
0, 1}, | |
469 {"immutablePointFunction", TestTypedefsV8Internal::immutablePointFunctionMet
hodCallback, 0, 0}, | |
470 {"stringArrayFunction", TestTypedefsV8Internal::stringArrayFunctionMethodCal
lback, 0, 1}, | 452 {"stringArrayFunction", TestTypedefsV8Internal::stringArrayFunctionMethodCal
lback, 0, 1}, |
471 {"stringArrayFunction2", TestTypedefsV8Internal::stringArrayFunction2MethodC
allback, 0, 1}, | 453 {"stringArrayFunction2", TestTypedefsV8Internal::stringArrayFunction2MethodC
allback, 0, 1}, |
472 {"methodWithException", TestTypedefsV8Internal::methodWithExceptionMethodCal
lback, 0, 0}, | 454 {"methodWithException", TestTypedefsV8Internal::methodWithExceptionMethodCal
lback, 0, 0}, |
473 }; | 455 }; |
474 | 456 |
475 void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) | 457 void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) |
476 { | 458 { |
477 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); | 459 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); |
478 if (!info.IsConstructCall()) { | 460 if (!info.IsConstructCall()) { |
479 throwTypeError(ExceptionMessages::failedToConstruct("TestTypedefs", "Ple
ase use the 'new' operator, this DOM object constructor cannot be called as a fu
nction."), info.GetIsolate()); | 461 throwTypeError(ExceptionMessages::failedToConstruct("TestTypedefs", "Ple
ase use the 'new' operator, this DOM object constructor cannot be called as a fu
nction."), info.GetIsolate()); |
(...skipping 12 matching lines...) Expand all Loading... |
492 { | 474 { |
493 functionTemplate->ReadOnlyPrototype(); | 475 functionTemplate->ReadOnlyPrototype(); |
494 | 476 |
495 v8::Local<v8::Signature> defaultSignature; | 477 v8::Local<v8::Signature> defaultSignature; |
496 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestTypedefs", v8::Local<v8::FunctionTemplate>(), V8TestTypedefs::internal
FieldCount, | 478 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(functionTempl
ate, "TestTypedefs", v8::Local<v8::FunctionTemplate>(), V8TestTypedefs::internal
FieldCount, |
497 V8TestTypedefsAttributes, WTF_ARRAY_LENGTH(V8TestTypedefsAttributes), | 479 V8TestTypedefsAttributes, WTF_ARRAY_LENGTH(V8TestTypedefsAttributes), |
498 0, 0, | 480 0, 0, |
499 V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods), | 481 V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods), |
500 isolate, currentWorldType); | 482 isolate, currentWorldType); |
501 functionTemplate->SetCallHandler(V8TestTypedefs::constructorCallback); | 483 functionTemplate->SetCallHandler(V8TestTypedefs::constructorCallback); |
502 functionTemplate->SetLength(2); | 484 functionTemplate->SetLength(1); |
503 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); | 485 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED instanceTemplate = functionTempla
te->InstanceTemplate(); |
504 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); | 486 v8::Local<v8::ObjectTemplate> ALLOW_UNUSED prototypeTemplate = functionTempl
ate->PrototypeTemplate(); |
505 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "TestSubObj"
), TestTypedefsV8Internal::TestTypedefsConstructorGetter, 0, v8::External::New(i
solate, const_cast<WrapperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo)), static_ca
st<v8::PropertyAttribute>(v8::DontEnum), v8::Handle<v8::AccessorSignature>(), st
atic_cast<v8::AccessControl>(v8::DEFAULT)); | 487 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "TestSubObj"
), TestTypedefsV8Internal::TestTypedefsConstructorGetter, 0, v8::External::New(i
solate, const_cast<WrapperTypeInfo*>(&V8TestSubObj::wrapperTypeInfo)), static_ca
st<v8::PropertyAttribute>(v8::DontEnum), v8::Handle<v8::AccessorSignature>(), st
atic_cast<v8::AccessControl>(v8::DEFAULT)); |
506 | 488 |
507 // Custom toString template | 489 // Custom toString template |
508 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:current()->toStringTemplate()); | 490 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData:
:current()->toStringTemplate()); |
509 } | 491 } |
510 | 492 |
511 v8::Handle<v8::FunctionTemplate> V8TestTypedefs::domTemplate(v8::Isolate* isolat
e, WrapperWorldType currentWorldType) | 493 v8::Handle<v8::FunctionTemplate> V8TestTypedefs::domTemplate(v8::Isolate* isolat
e, WrapperWorldType currentWorldType) |
512 { | 494 { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
560 fromInternalPointer(object)->deref(); | 542 fromInternalPointer(object)->deref(); |
561 } | 543 } |
562 | 544 |
563 template<> | 545 template<> |
564 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) | 546 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr
eationContext, v8::Isolate* isolate) |
565 { | 547 { |
566 return toV8(impl, creationContext, isolate); | 548 return toV8(impl, creationContext, isolate); |
567 } | 549 } |
568 | 550 |
569 } // namespace WebCore | 551 } // namespace WebCore |
OLD | NEW |