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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 {"SUPPLEMENTALCONSTANT1", 1}, | 425 {"SUPPLEMENTALCONSTANT1", 1}, |
426 {"SUPPLEMENTALCONSTANT2", 2}, | 426 {"SUPPLEMENTALCONSTANT2", 2}, |
427 }; | 427 }; |
428 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
SupportTestInterfaceConstants, WTF_ARRAY_LENGTH(V8SupportTestInterfaceConstants)
, isolate); | 428 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
SupportTestInterfaceConstants, WTF_ARRAY_LENGTH(V8SupportTestInterfaceConstants)
, isolate); |
429 COMPILE_ASSERT(1 == SupportTestPartialInterface::SUPPLEMENTALCONSTANT1, TheV
alueOfSupportTestInterface_SUPPLEMENTALCONSTANT1DoesntMatchWithImplementation); | 429 COMPILE_ASSERT(1 == SupportTestPartialInterface::SUPPLEMENTALCONSTANT1, TheV
alueOfSupportTestInterface_SUPPLEMENTALCONSTANT1DoesntMatchWithImplementation); |
430 COMPILE_ASSERT(2 == SupportTestPartialInterface::CONST_IMPL, TheValueOfSuppo
rtTestInterface_CONST_IMPLDoesntMatchWithImplementation); | 430 COMPILE_ASSERT(2 == SupportTestPartialInterface::CONST_IMPL, TheValueOfSuppo
rtTestInterface_CONST_IMPLDoesntMatchWithImplementation); |
431 #if ENABLE(Condition11) || ENABLE(Condition12) | 431 #if ENABLE(Condition11) || ENABLE(Condition12) |
432 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "supplementalMethod4"
, v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, SupportTe
stInterfaceV8Internal::supplementalMethod4MethodCallback, v8Undefined(), v8::Loc
al<v8::Signature>(), 0)); | 432 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "supplementalMethod4"
, v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, SupportTe
stInterfaceV8Internal::supplementalMethod4MethodCallback, v8Undefined(), v8::Loc
al<v8::Signature>(), 0)); |
433 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 433 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
434 #if ENABLE(Condition11) || ENABLE(Condition12) | 434 #if ENABLE(Condition11) || ENABLE(Condition12) |
435 functionTemplate->SetNativeDataProperty(v8::String::NewFromUtf8(isolate, "su
pplementalStaticReadOnlyAttr", v8::String::kInternalizedString), SupportTestInte
rfaceV8Internal::supplementalStaticReadOnlyAttrAttributeGetterCallback, 0, v8::E
xternal::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Hand
le<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 435 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "supplementa
lStaticReadOnlyAttr"), SupportTestInterfaceV8Internal::supplementalStaticReadOnl
yAttrAttributeGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::
PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v
8::AccessControl>(v8::DEFAULT)); |
436 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 436 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
437 #if ENABLE(Condition11) || ENABLE(Condition12) | 437 #if ENABLE(Condition11) || ENABLE(Condition12) |
438 functionTemplate->SetNativeDataProperty(v8::String::NewFromUtf8(isolate, "su
pplementalStaticAttr", v8::String::kInternalizedString), SupportTestInterfaceV8I
nternal::supplementalStaticAttrAttributeGetterCallback, SupportTestInterfaceV8In
ternal::supplementalStaticAttrAttributeSetterCallback, v8::External::New(isolate
, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSigna
ture>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 438 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "supplementa
lStaticAttr"), SupportTestInterfaceV8Internal::supplementalStaticAttrAttributeGe
tterCallback, SupportTestInterfaceV8Internal::supplementalStaticAttrAttributeSet
terCallback, v8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v
8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8
::DEFAULT)); |
439 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 439 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
440 | 440 |
441 // Custom toString template | 441 // Custom toString template |
442 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin
g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); | 442 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin
g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); |
443 return functionTemplate; | 443 return functionTemplate; |
444 } | 444 } |
445 | 445 |
446 v8::Handle<v8::FunctionTemplate> V8SupportTestInterface::domTemplate(v8::Isolate
* isolate, WrapperWorldType currentWorldType) | 446 v8::Handle<v8::FunctionTemplate> V8SupportTestInterface::domTemplate(v8::Isolate
* isolate, WrapperWorldType currentWorldType) |
447 { | 447 { |
448 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 448 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 fromInternalPointer(object)->deref(); | 505 fromInternalPointer(object)->deref(); |
506 } | 506 } |
507 | 507 |
508 template<> | 508 template<> |
509 v8::Handle<v8::Value> toV8NoInline(SupportTestInterface* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 509 v8::Handle<v8::Value> toV8NoInline(SupportTestInterface* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
510 { | 510 { |
511 return toV8(impl, creationContext, isolate); | 511 return toV8(impl, creationContext, isolate); |
512 } | 512 } |
513 | 513 |
514 } // namespace WebCore | 514 } // namespace WebCore |
OLD | NEW |