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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); | 883 V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, V8
TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); |
884 COMPILE_ASSERT(1 == TestImplements::IMPLEMENTSCONSTANT1, TheValueOfTestInter
face_IMPLEMENTSCONSTANT1DoesntMatchWithImplementation); | 884 COMPILE_ASSERT(1 == TestImplements::IMPLEMENTSCONSTANT1, TheValueOfTestInter
face_IMPLEMENTSCONSTANT1DoesntMatchWithImplementation); |
885 COMPILE_ASSERT(2 == TestImplements::CONST_IMPL, TheValueOfTestInterface_CONS
T_IMPLDoesntMatchWithImplementation); | 885 COMPILE_ASSERT(2 == TestImplements::CONST_IMPL, TheValueOfTestInterface_CONS
T_IMPLDoesntMatchWithImplementation); |
886 COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TheValueOfT
estInterface_SUPPLEMENTALCONSTANT1DoesntMatchWithImplementation); | 886 COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TheValueOfT
estInterface_SUPPLEMENTALCONSTANT1DoesntMatchWithImplementation); |
887 COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TheValueOfTestInterfac
e_CONST_IMPLDoesntMatchWithImplementation); | 887 COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TheValueOfTestInterfac
e_CONST_IMPLDoesntMatchWithImplementation); |
888 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceV
8Internal::namedPropertyGetterCallback, TestInterfaceV8Internal::namedPropertySe
tterCallback, TestInterfaceV8Internal::namedPropertyQueryCallback, 0, TestInterf
aceV8Internal::namedPropertyEnumeratorCallback); | 888 functionTemplate->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceV
8Internal::namedPropertyGetterCallback, TestInterfaceV8Internal::namedPropertySe
tterCallback, TestInterfaceV8Internal::namedPropertyQueryCallback, 0, TestInterf
aceV8Internal::namedPropertyEnumeratorCallback); |
889 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "implementsMethod4",
v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestInterfa
ceV8Internal::implementsMethod4MethodCallback, v8Undefined(), v8::Local<v8::Sign
ature>(), 0)); | 889 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "implementsMethod4",
v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestInterfa
ceV8Internal::implementsMethod4MethodCallback, v8Undefined(), v8::Local<v8::Sign
ature>(), 0)); |
890 #if ENABLE(Condition11) || ENABLE(Condition12) | 890 #if ENABLE(Condition11) || ENABLE(Condition12) |
891 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "supplementalMethod4"
, v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestInter
faceV8Internal::supplementalMethod4MethodCallback, v8Undefined(), v8::Local<v8::
Signature>(), 0)); | 891 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "supplementalMethod4"
, v8::String::kInternalizedString), v8::FunctionTemplate::New(isolate, TestInter
faceV8Internal::supplementalMethod4MethodCallback, v8Undefined(), v8::Local<v8::
Signature>(), 0)); |
892 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 892 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
893 functionTemplate->SetNativeDataProperty(v8::String::NewFromUtf8(isolate, "im
plementsStaticReadOnlyAttr", v8::String::kInternalizedString), TestInterfaceV8In
ternal::implementsStaticReadOnlyAttrAttributeGetterCallback, 0, v8::External::Ne
w(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Acce
ssorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 893 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS
taticReadOnlyAttr"), TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttrib
uteGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::PropertyAtt
ribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessCo
ntrol>(v8::DEFAULT)); |
894 functionTemplate->SetNativeDataProperty(v8::String::NewFromUtf8(isolate, "im
plementsStaticAttr", v8::String::kInternalizedString), TestInterfaceV8Internal::
implementsStaticAttrAttributeGetterCallback, TestInterfaceV8Internal::implements
StaticAttrAttributeSetterCallback, v8::External::New(isolate, 0), static_cast<v8
::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast
<v8::AccessControl>(v8::DEFAULT)); | 894 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "implementsS
taticAttr"), TestInterfaceV8Internal::implementsStaticAttrAttributeGetterCallbac
k, TestInterfaceV8Internal::implementsStaticAttrAttributeSetterCallback, v8::Ext
ernal::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle
<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
895 #if ENABLE(Condition11) || ENABLE(Condition12) | 895 #if ENABLE(Condition11) || ENABLE(Condition12) |
896 functionTemplate->SetNativeDataProperty(v8::String::NewFromUtf8(isolate, "su
pplementalStaticReadOnlyAttr", v8::String::kInternalizedString), TestInterfaceV8
Internal::supplementalStaticReadOnlyAttrAttributeGetterCallback, 0, v8::External
::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::
AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 896 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "supplementa
lStaticReadOnlyAttr"), TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAt
tributeGetterCallback, 0, v8::External::New(isolate, 0), static_cast<v8::Propert
yAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), static_cast<v8::Acce
ssControl>(v8::DEFAULT)); |
897 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 897 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
898 #if ENABLE(Condition11) || ENABLE(Condition12) | 898 #if ENABLE(Condition11) || ENABLE(Condition12) |
899 functionTemplate->SetNativeDataProperty(v8::String::NewFromUtf8(isolate, "su
pplementalStaticAttr", v8::String::kInternalizedString), TestInterfaceV8Internal
::supplementalStaticAttrAttributeGetterCallback, TestInterfaceV8Internal::supple
mentalStaticAttrAttributeSetterCallback, v8::External::New(isolate, 0), static_c
ast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>(), stati
c_cast<v8::AccessControl>(v8::DEFAULT)); | 899 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "supplementa
lStaticAttr"), TestInterfaceV8Internal::supplementalStaticAttrAttributeGetterCal
lback, TestInterfaceV8Internal::supplementalStaticAttrAttributeSetterCallback, v
8::External::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::
Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
900 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 900 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
901 | 901 |
902 // Custom toString template | 902 // Custom toString template |
903 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin
g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); | 903 functionTemplate->Set(v8::String::NewFromUtf8(isolate, "toString", v8::Strin
g::kInternalizedString), V8PerIsolateData::current()->toStringTemplate()); |
904 } | 904 } |
905 | 905 |
906 v8::Handle<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isola
te, WrapperWorldType currentWorldType) | 906 v8::Handle<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isola
te, WrapperWorldType currentWorldType) |
907 { | 907 { |
908 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 908 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
909 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); | 909 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
981 } | 981 } |
982 | 982 |
983 template<> | 983 template<> |
984 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 984 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
985 { | 985 { |
986 return toV8(impl, creationContext, isolate); | 986 return toV8(impl, creationContext, isolate); |
987 } | 987 } |
988 | 988 |
989 } // namespace WebCore | 989 } // namespace WebCore |
990 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 990 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
OLD | NEW |