OLD | NEW |
1 /* | 1 /* |
2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
4 | 4 |
5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
9 | 9 |
10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
(...skipping 29 matching lines...) Expand all Loading... |
40 #include "platform/TraceEvent.h" | 40 #include "platform/TraceEvent.h" |
41 #include "wtf/GetPtr.h" | 41 #include "wtf/GetPtr.h" |
42 #include "wtf/RefPtr.h" | 42 #include "wtf/RefPtr.h" |
43 #include "wtf/UnusedParam.h" | 43 #include "wtf/UnusedParam.h" |
44 | 44 |
45 namespace WebCore { | 45 namespace WebCore { |
46 | 46 |
47 static void initializeScriptWrappableForInterface(TestInterface* object) | 47 static void initializeScriptWrappableForInterface(TestInterface* object) |
48 { | 48 { |
49 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) | 49 if (ScriptWrappable::wrapperCanBeStoredInObject(object)) |
50 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterface::info); | 50 ScriptWrappable::setTypeInfoInObject(object, &V8TestInterface::wrapperTy
peInfo); |
51 else | 51 else |
52 ASSERT_NOT_REACHED(); | 52 ASSERT_NOT_REACHED(); |
53 } | 53 } |
54 | 54 |
55 } // namespace WebCore | 55 } // namespace WebCore |
56 | 56 |
57 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: | 57 // In ScriptWrappable::init, the use of a local function declaration has an issu
e on Windows: |
58 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function | 58 // the local declaration does not pick up the surrounding namespace. Therefore,
we provide this function |
59 // in the global namespace. | 59 // in the global namespace. |
60 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) | 60 // (More info on the MSVC bug here: http://connect.microsoft.com/VisualStudio/fe
edback/details/664619/the-namespace-of-local-function-declarations-in-c) |
61 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterface* object
) | 61 void webCoreInitializeScriptWrappableForInterface(WebCore::TestInterface* object
) |
62 { | 62 { |
63 WebCore::initializeScriptWrappableForInterface(object); | 63 WebCore::initializeScriptWrappableForInterface(object); |
64 } | 64 } |
65 | 65 |
66 namespace WebCore { | 66 namespace WebCore { |
67 WrapperTypeInfo V8TestInterface::info = { V8TestInterface::GetTemplate, V8TestIn
terface::derefObject, V8TestInterface::toActiveDOMObject, 0, 0, V8TestInterface:
:installPerContextEnabledPrototypeProperties, 0, WrapperTypeObjectPrototype }; | 67 WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { V8TestInterface::GetTemplat
e, V8TestInterface::derefObject, V8TestInterface::toActiveDOMObject, 0, 0, V8Tes
tInterface::installPerContextEnabledPrototypeProperties, 0, WrapperTypeObjectPro
totype }; |
68 | 68 |
69 namespace TestInterfaceV8Internal { | 69 namespace TestInterfaceV8Internal { |
70 | 70 |
71 template <typename T> void V8_USE(T) { } | 71 template <typename T> void V8_USE(T) { } |
72 | 72 |
73 static void implementsStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) | 73 static void implementsStaticReadOnlyAttrAttributeGetter(v8::Local<v8::String> na
me, const v8::PropertyCallbackInfo<v8::Value>& info) |
74 { | 74 { |
75 v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyAttr()); | 75 v8SetReturnValueInt(info, TestImplements::implementsStaticReadOnlyAttr()); |
76 } | 76 } |
77 | 77 |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
660 ExceptionState es(args.GetIsolate()); | 660 ExceptionState es(args.GetIsolate()); |
661 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, args[0]); | 661 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, args[0]); |
662 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, args[1]); | 662 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, args[1]); |
663 | 663 |
664 ExecutionContext* context = getExecutionContext(); | 664 ExecutionContext* context = getExecutionContext(); |
665 RefPtr<TestInterface> impl = TestInterface::create(context, str1, str2, es); | 665 RefPtr<TestInterface> impl = TestInterface::create(context, str1, str2, es); |
666 v8::Handle<v8::Object> wrapper = args.Holder(); | 666 v8::Handle<v8::Object> wrapper = args.Holder(); |
667 if (es.throwIfNeeded()) | 667 if (es.throwIfNeeded()) |
668 return; | 668 return; |
669 | 669 |
670 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl.release(), &V
8TestInterface::info, wrapper, args.GetIsolate(), WrapperConfiguration::Dependen
t); | 670 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl.release(), &V
8TestInterface::wrapperTypeInfo, wrapper, args.GetIsolate(), WrapperConfiguratio
n::Dependent); |
671 args.GetReturnValue().Set(wrapper); | 671 args.GetReturnValue().Set(wrapper); |
672 } | 672 } |
673 | 673 |
674 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) | 674 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) |
675 { | 675 { |
676 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 676 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
677 return; | 677 return; |
678 if (info.Holder()->HasRealNamedCallbackProperty(name)) | 678 if (info.Holder()->HasRealNamedCallbackProperty(name)) |
679 return; | 679 return; |
680 if (info.Holder()->HasRealNamedProperty(name)) | 680 if (info.Holder()->HasRealNamedProperty(name)) |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 }; | 839 }; |
840 V8DOMConfiguration::installConstants(desc, proto, V8TestInterfaceConstants,
WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); | 840 V8DOMConfiguration::installConstants(desc, proto, V8TestInterfaceConstants,
WTF_ARRAY_LENGTH(V8TestInterfaceConstants), isolate); |
841 COMPILE_ASSERT(1 == TestImplements::IMPLEMENTSCONSTANT1, TheValueOfTestInter
face_IMPLEMENTSCONSTANT1DoesntMatchWithImplementation); | 841 COMPILE_ASSERT(1 == TestImplements::IMPLEMENTSCONSTANT1, TheValueOfTestInter
face_IMPLEMENTSCONSTANT1DoesntMatchWithImplementation); |
842 COMPILE_ASSERT(2 == TestImplements::CONST_IMPL, TheValueOfTestInterface_CONS
T_IMPLDoesntMatchWithImplementation); | 842 COMPILE_ASSERT(2 == TestImplements::CONST_IMPL, TheValueOfTestInterface_CONS
T_IMPLDoesntMatchWithImplementation); |
843 COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TheValueOfT
estInterface_SUPPLEMENTALCONSTANT1DoesntMatchWithImplementation); | 843 COMPILE_ASSERT(1 == TestPartialInterface::SUPPLEMENTALCONSTANT1, TheValueOfT
estInterface_SUPPLEMENTALCONSTANT1DoesntMatchWithImplementation); |
844 COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TheValueOfTestInterfac
e_CONST_IMPLDoesntMatchWithImplementation); | 844 COMPILE_ASSERT(2 == TestPartialInterface::CONST_IMPL, TheValueOfTestInterfac
e_CONST_IMPLDoesntMatchWithImplementation); |
845 desc->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceV8Internal::n
amedPropertyGetterCallback, TestInterfaceV8Internal::namedPropertySetterCallback
, TestInterfaceV8Internal::namedPropertyQueryCallback, 0, TestInterfaceV8Interna
l::namedPropertyEnumeratorCallback); | 845 desc->InstanceTemplate()->SetNamedPropertyHandler(TestInterfaceV8Internal::n
amedPropertyGetterCallback, TestInterfaceV8Internal::namedPropertySetterCallback
, TestInterfaceV8Internal::namedPropertyQueryCallback, 0, TestInterfaceV8Interna
l::namedPropertyEnumeratorCallback); |
846 | 846 |
847 // Custom Signature 'implementsMethod2' | 847 // Custom Signature 'implementsMethod2' |
848 const int implementsMethod2Argc = 2; | 848 const int implementsMethod2Argc = 2; |
849 v8::Handle<v8::FunctionTemplate> implementsMethod2Argv[implementsMethod2Argc
] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTe
mplate(&V8TestObject::info, currentWorldType) }; | 849 v8::Handle<v8::FunctionTemplate> implementsMethod2Argv[implementsMethod2Argc
] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTe
mplate(&V8TestObject::wrapperTypeInfo, currentWorldType) }; |
850 v8::Handle<v8::Signature> implementsMethod2Signature = v8::Signature::New(de
sc, implementsMethod2Argc, implementsMethod2Argv); | 850 v8::Handle<v8::Signature> implementsMethod2Signature = v8::Signature::New(de
sc, implementsMethod2Argc, implementsMethod2Argv); |
851 proto->Set(v8::String::NewSymbol("implementsMethod2"), v8::FunctionTemplate:
:New(TestInterfaceV8Internal::implementsMethod2MethodCallback, v8Undefined(), im
plementsMethod2Signature, 2)); | 851 proto->Set(v8::String::NewSymbol("implementsMethod2"), v8::FunctionTemplate:
:New(TestInterfaceV8Internal::implementsMethod2MethodCallback, v8Undefined(), im
plementsMethod2Signature, 2)); |
852 desc->Set(v8::String::NewSymbol("implementsMethod4"), v8::FunctionTemplate::
New(TestInterfaceV8Internal::implementsMethod4MethodCallback, v8Undefined(), v8:
:Local<v8::Signature>(), 0)); | 852 desc->Set(v8::String::NewSymbol("implementsMethod4"), v8::FunctionTemplate::
New(TestInterfaceV8Internal::implementsMethod4MethodCallback, v8Undefined(), v8:
:Local<v8::Signature>(), 0)); |
853 #if ENABLE(Condition11) || ENABLE(Condition12) | 853 #if ENABLE(Condition11) || ENABLE(Condition12) |
854 | 854 |
855 // Custom Signature 'supplementalMethod2' | 855 // Custom Signature 'supplementalMethod2' |
856 const int supplementalMethod2Argc = 2; | 856 const int supplementalMethod2Argc = 2; |
857 v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2
Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->r
awTemplate(&V8TestObject::info, currentWorldType) }; | 857 v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2
Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->r
awTemplate(&V8TestObject::wrapperTypeInfo, currentWorldType) }; |
858 v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New(
desc, supplementalMethod2Argc, supplementalMethod2Argv); | 858 v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New(
desc, supplementalMethod2Argc, supplementalMethod2Argv); |
859 proto->Set(v8::String::NewSymbol("supplementalMethod2"), v8::FunctionTemplat
e::New(TestInterfaceV8Internal::supplementalMethod2MethodCallback, v8Undefined()
, supplementalMethod2Signature, 2)); | 859 proto->Set(v8::String::NewSymbol("supplementalMethod2"), v8::FunctionTemplat
e::New(TestInterfaceV8Internal::supplementalMethod2MethodCallback, v8Undefined()
, supplementalMethod2Signature, 2)); |
860 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 860 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
861 #if ENABLE(Condition11) || ENABLE(Condition12) | 861 #if ENABLE(Condition11) || ENABLE(Condition12) |
862 desc->Set(v8::String::NewSymbol("supplementalMethod4"), v8::FunctionTemplate
::New(TestInterfaceV8Internal::supplementalMethod4MethodCallback, v8Undefined(),
v8::Local<v8::Signature>(), 0)); | 862 desc->Set(v8::String::NewSymbol("supplementalMethod4"), v8::FunctionTemplate
::New(TestInterfaceV8Internal::supplementalMethod4MethodCallback, v8Undefined(),
v8::Local<v8::Signature>(), 0)); |
863 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 863 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
864 desc->SetNativeDataProperty(v8::String::NewSymbol("implementsStaticReadOnlyA
ttr"), TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttributeGetterCallb
ack, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::
Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 864 desc->SetNativeDataProperty(v8::String::NewSymbol("implementsStaticReadOnlyA
ttr"), TestInterfaceV8Internal::implementsStaticReadOnlyAttrAttributeGetterCallb
ack, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None), v8::
Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
865 desc->SetNativeDataProperty(v8::String::NewSymbol("implementsStaticAttr"), T
estInterfaceV8Internal::implementsStaticAttrAttributeGetterCallback, TestInterfa
ceV8Internal::implementsStaticAttrAttributeSetterCallback, v8::External::New(0),
static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>
(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 865 desc->SetNativeDataProperty(v8::String::NewSymbol("implementsStaticAttr"), T
estInterfaceV8Internal::implementsStaticAttrAttributeGetterCallback, TestInterfa
ceV8Internal::implementsStaticAttrAttributeSetterCallback, v8::External::New(0),
static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSignature>
(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
866 #if ENABLE(Condition11) || ENABLE(Condition12) | 866 #if ENABLE(Condition11) || ENABLE(Condition12) |
867 desc->SetNativeDataProperty(v8::String::NewSymbol("supplementalStaticReadOnl
yAttr"), TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttributeGetterC
allback, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None),
v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)
); | 867 desc->SetNativeDataProperty(v8::String::NewSymbol("supplementalStaticReadOnl
yAttr"), TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttributeGetterC
allback, 0, v8::External::New(0), static_cast<v8::PropertyAttribute>(v8::None),
v8::Handle<v8::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)
); |
868 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 868 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
869 #if ENABLE(Condition11) || ENABLE(Condition12) | 869 #if ENABLE(Condition11) || ENABLE(Condition12) |
870 desc->SetNativeDataProperty(v8::String::NewSymbol("supplementalStaticAttr"),
TestInterfaceV8Internal::supplementalStaticAttrAttributeGetterCallback, TestInt
erfaceV8Internal::supplementalStaticAttrAttributeSetterCallback, v8::External::N
ew(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSign
ature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); | 870 desc->SetNativeDataProperty(v8::String::NewSymbol("supplementalStaticAttr"),
TestInterfaceV8Internal::supplementalStaticAttrAttributeGetterCallback, TestInt
erfaceV8Internal::supplementalStaticAttrAttributeSetterCallback, v8::External::N
ew(0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::AccessorSign
ature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); |
871 #endif // ENABLE(Condition11) || ENABLE(Condition12) | 871 #endif // ENABLE(Condition11) || ENABLE(Condition12) |
872 | 872 |
873 // Custom toString template | 873 // Custom toString template |
874 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to
StringTemplate()); | 874 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->to
StringTemplate()); |
875 return desc; | 875 return desc; |
876 } | 876 } |
877 | 877 |
878 v8::Handle<v8::FunctionTemplate> V8TestInterface::GetTemplate(v8::Isolate* isola
te, WrapperWorldType currentWorldType) | 878 v8::Handle<v8::FunctionTemplate> V8TestInterface::GetTemplate(v8::Isolate* isola
te, WrapperWorldType currentWorldType) |
879 { | 879 { |
880 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 880 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
881 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&info); | 881 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWo
rldType).find(&wrapperTypeInfo); |
882 if (result != data->templateMap(currentWorldType).end()) | 882 if (result != data->templateMap(currentWorldType).end()) |
883 return result->value.newLocal(isolate); | 883 return result->value.newLocal(isolate); |
884 | 884 |
885 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); | 885 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "BuildDOMTemplate"); |
886 v8::HandleScope handleScope(isolate); | 886 v8::HandleScope handleScope(isolate); |
887 v8::Handle<v8::FunctionTemplate> templ = | 887 v8::Handle<v8::FunctionTemplate> templ = |
888 ConfigureV8TestInterfaceTemplate(data->rawTemplate(&info, currentWorldTy
pe), isolate, currentWorldType); | 888 ConfigureV8TestInterfaceTemplate(data->rawTemplate(&wrapperTypeInfo, cur
rentWorldType), isolate, currentWorldType); |
889 data->templateMap(currentWorldType).add(&info, UnsafePersistent<v8::Function
Template>(isolate, templ)); | 889 data->templateMap(currentWorldType).add(&wrapperTypeInfo, UnsafePersistent<v
8::FunctionTemplate>(isolate, templ)); |
890 return handleScope.Close(templ); | 890 return handleScope.Close(templ); |
891 } | 891 } |
892 | 892 |
893 bool V8TestInterface::HasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* is
olate, WrapperWorldType currentWorldType) | 893 bool V8TestInterface::HasInstance(v8::Handle<v8::Value> jsValue, v8::Isolate* is
olate, WrapperWorldType currentWorldType) |
894 { | 894 { |
895 return V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, currentW
orldType); | 895 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, currentWorldType); |
896 } | 896 } |
897 | 897 |
898 bool V8TestInterface::HasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8::I
solate* isolate) | 898 bool V8TestInterface::HasInstanceInAnyWorld(v8::Handle<v8::Value> jsValue, v8::I
solate* isolate) |
899 { | 899 { |
900 return V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, MainWorl
d) | 900 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, MainWorld) |
901 || V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, Isolated
World) | 901 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, IsolatedWorld) |
902 || V8PerIsolateData::from(isolate)->hasInstance(&info, jsValue, WorkerWo
rld); | 902 || V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, jsValu
e, WorkerWorld); |
903 } | 903 } |
904 | 904 |
905 void V8TestInterface::installPerContextEnabledProperties(v8::Handle<v8::Object>
instance, TestInterface* impl, v8::Isolate* isolate) | 905 void V8TestInterface::installPerContextEnabledProperties(v8::Handle<v8::Object>
instance, TestInterface* impl, v8::Isolate* isolate) |
906 { | 906 { |
907 v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetProto
type()); | 907 v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetProto
type()); |
908 if (ContextFeatures::featureName24Enabled(impl->document())) { | 908 if (ContextFeatures::featureName24Enabled(impl->document())) { |
909 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ | 909 static const V8DOMConfiguration::AttributeConfiguration attributeConfigu
ration =\ |
910 {"Node24", TestInterfaceV8Internal::Node24AttributeGetterCallback, TestI
nterfaceV8Internal::Node24AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
nstance */}; | 910 {"Node24", TestInterfaceV8Internal::Node24AttributeGetterCallback, TestI
nterfaceV8Internal::Node24AttributeSetterCallback, 0, 0, 0, static_cast<v8::Acce
ssControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on i
nstance */}; |
911 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura
tion, isolate); | 911 V8DOMConfiguration::installAttribute(instance, proto, attributeConfigura
tion, isolate); |
912 } | 912 } |
(...skipping 13 matching lines...) Expand all Loading... |
926 { | 926 { |
927 return toNative(object); | 927 return toNative(object); |
928 } | 928 } |
929 | 929 |
930 v8::Handle<v8::Object> V8TestInterface::createWrapper(PassRefPtr<TestInterface>
impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | 930 v8::Handle<v8::Object> V8TestInterface::createWrapper(PassRefPtr<TestInterface>
impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) |
931 { | 931 { |
932 ASSERT(impl); | 932 ASSERT(impl); |
933 ASSERT(!DOMDataStore::containsWrapper<V8TestInterface>(impl.get(), isolate))
; | 933 ASSERT(!DOMDataStore::containsWrapper<V8TestInterface>(impl.get(), isolate))
; |
934 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 934 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
935 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); | 935 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl.get()); |
936 // Might be a XXXConstructor::info instead of an XXX::info. These will b
oth have | 936 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
937 // the same object de-ref functions, though, so use that as the basis of
the check. | 937 // the same object de-ref functions, though, so use that as the basis of
the check. |
938 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== info.derefObjectFunction); | 938 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); |
939 } | 939 } |
940 | 940 |
941 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &info, toInternalPointer(impl.get()), isolate); | 941 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
942 if (UNLIKELY(wrapper.IsEmpty())) | 942 if (UNLIKELY(wrapper.IsEmpty())) |
943 return wrapper; | 943 return wrapper; |
944 | 944 |
945 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 945 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
946 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl, &info, wrapp
er, isolate, WrapperConfiguration::Dependent); | 946 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl, &wrapperType
Info, wrapper, isolate, WrapperConfiguration::Dependent); |
947 return wrapper; | 947 return wrapper; |
948 } | 948 } |
949 | 949 |
950 void V8TestInterface::derefObject(void* object) | 950 void V8TestInterface::derefObject(void* object) |
951 { | 951 { |
952 fromInternalPointer(object)->deref(); | 952 fromInternalPointer(object)->deref(); |
953 } | 953 } |
954 | 954 |
955 } // namespace WebCore | 955 } // namespace WebCore |
956 | 956 |
957 #endif // ENABLE(Condition1) || ENABLE(Condition2) | 957 #endif // ENABLE(Condition1) || ENABLE(Condition2) |
OLD | NEW |