| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file has been auto-generated by code_generator_v8.py. | 5 // This file has been auto-generated by code_generator_v8.py. |
| 6 // DO NOT MODIFY! | 6 // DO NOT MODIFY! |
| 7 | 7 |
| 8 // This file has been generated from the Jinja2 template in | 8 // This file has been generated from the Jinja2 template in |
| 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl | 9 // third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
| 10 | 10 |
| (...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2002 | 2002 |
| 2003 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | 2003 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
| 2004 | 2004 |
| 2005 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); | 2005 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); |
| 2006 if (exceptionState.HadException()) { | 2006 if (exceptionState.HadException()) { |
| 2007 return; | 2007 return; |
| 2008 } | 2008 } |
| 2009 V8SetReturnValue(info, result); | 2009 V8SetReturnValue(info, result); |
| 2010 } | 2010 } |
| 2011 | 2011 |
| 2012 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { | |
| 2013 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "TestInterface", "entries"); | |
| 2014 | |
| 2015 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | |
| 2016 | |
| 2017 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | |
| 2018 | |
| 2019 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); | |
| 2020 if (exceptionState.HadException()) { | |
| 2021 return; | |
| 2022 } | |
| 2023 V8SetReturnValue(info, result); | |
| 2024 } | |
| 2025 | |
| 2026 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { | 2012 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 2027 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "TestInterface", "forEach"); | 2013 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kExecutionCon
text, "TestInterface", "forEach"); |
| 2028 | 2014 |
| 2029 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 2015 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 2030 | 2016 |
| 2031 ScriptState* scriptState = ScriptState::ForReceiverObject(info); | 2017 ScriptState* scriptState = ScriptState::ForReceiverObject(info); |
| 2032 | 2018 |
| 2033 if (UNLIKELY(info.Length() < 1)) { | 2019 if (UNLIKELY(info.Length() < 1)) { |
| 2034 exceptionState.ThrowTypeError(ExceptionMessages::NotEnoughArguments(1, info.
Length())); | 2020 exceptionState.ThrowTypeError(ExceptionMessages::NotEnoughArguments(1, info.
Length())); |
| 2035 return; | 2021 return; |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2841 } | 2827 } |
| 2842 | 2828 |
| 2843 void V8TestInterface::keysMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { | 2829 void V8TestInterface::keysMethodCallback(const v8::FunctionCallbackInfo<v8::Valu
e>& info) { |
| 2844 TestInterfaceImplementationV8Internal::keysMethod(info); | 2830 TestInterfaceImplementationV8Internal::keysMethod(info); |
| 2845 } | 2831 } |
| 2846 | 2832 |
| 2847 void V8TestInterface::valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { | 2833 void V8TestInterface::valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { |
| 2848 TestInterfaceImplementationV8Internal::valuesMethod(info); | 2834 TestInterfaceImplementationV8Internal::valuesMethod(info); |
| 2849 } | 2835 } |
| 2850 | 2836 |
| 2851 void V8TestInterface::entriesMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) { | |
| 2852 TestInterfaceImplementationV8Internal::entriesMethod(info); | |
| 2853 } | |
| 2854 | |
| 2855 void V8TestInterface::forEachMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) { | 2837 void V8TestInterface::forEachMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) { |
| 2856 TestInterfaceImplementationV8Internal::forEachMethod(info); | 2838 TestInterfaceImplementationV8Internal::forEachMethod(info); |
| 2857 } | 2839 } |
| 2858 | 2840 |
| 2859 void V8TestInterface::toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { | 2841 void V8TestInterface::toJSONMethodCallback(const v8::FunctionCallbackInfo<v8::Va
lue>& info) { |
| 2860 TestInterfaceImplementationV8Internal::toJSONMethod(info); | 2842 TestInterfaceImplementationV8Internal::toJSONMethod(info); |
| 2861 } | 2843 } |
| 2862 | 2844 |
| 2863 void V8TestInterface::toStringMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) { | 2845 void V8TestInterface::toStringMethodCallback(const v8::FunctionCallbackInfo<v8::
Value>& info) { |
| 2864 TestInterfaceImplementationV8Internal::toStringMethod(info); | 2846 TestInterfaceImplementationV8Internal::toStringMethod(info); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3028 {"implements3VoidMethod", V8TestInterface::implements3VoidMethodMethodCallba
ck, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHol
der, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 3010 {"implements3VoidMethod", V8TestInterface::implements3VoidMethodMethodCallba
ck, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHol
der, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
| 3029 {"implements3StaticVoidMethod", V8TestInterface::implements3StaticVoidMethod
MethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguratio
n::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAll
Worlds}, | 3011 {"implements3StaticVoidMethod", V8TestInterface::implements3StaticVoidMethod
MethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguratio
n::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAll
Worlds}, |
| 3030 {"voidMethodPartialOverload", V8TestInterface::voidMethodPartialOverloadMeth
odCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::k
CheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorl
ds}, | 3012 {"voidMethodPartialOverload", V8TestInterface::voidMethodPartialOverloadMeth
odCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::k
CheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorl
ds}, |
| 3031 {"staticVoidMethodPartialOverload", V8TestInterface::staticVoidMethodPartial
OverloadMethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConf
iguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfigurati
on::kAllWorlds}, | 3013 {"staticVoidMethodPartialOverload", V8TestInterface::staticVoidMethodPartial
OverloadMethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConf
iguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfigurati
on::kAllWorlds}, |
| 3032 {"promiseMethodPartialOverload", V8TestInterface::promiseMethodPartialOverlo
adMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfigurat
ion::kDoNotCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguratio
n::kAllWorlds}, | 3014 {"promiseMethodPartialOverload", V8TestInterface::promiseMethodPartialOverlo
adMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfigurat
ion::kDoNotCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguratio
n::kAllWorlds}, |
| 3033 {"staticPromiseMethodPartialOverload", V8TestInterface::staticPromiseMethodP
artialOverloadMethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8D
OMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOM
Configuration::kAllWorlds}, | 3015 {"staticPromiseMethodPartialOverload", V8TestInterface::staticPromiseMethodP
artialOverloadMethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8D
OMConfiguration::kDoNotCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOM
Configuration::kAllWorlds}, |
| 3034 {"partial2VoidMethod", V8TestInterface::partial2VoidMethodMethodCallback, 0,
v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V
8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 3016 {"partial2VoidMethod", V8TestInterface::partial2VoidMethodMethodCallback, 0,
v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V
8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
| 3035 {"partial2StaticVoidMethod", V8TestInterface::partial2StaticVoidMethodMethod
Callback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCh
eckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds
}, | 3017 {"partial2StaticVoidMethod", V8TestInterface::partial2StaticVoidMethodMethod
Callback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCh
eckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds
}, |
| 3036 {"keys", V8TestInterface::keysMethodCallback, 0, v8::None, V8DOMConfiguratio
n::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotChe
ckAccess, V8DOMConfiguration::kAllWorlds}, | 3018 {"keys", V8TestInterface::keysMethodCallback, 0, v8::None, V8DOMConfiguratio
n::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotChe
ckAccess, V8DOMConfiguration::kAllWorlds}, |
| 3037 {"values", V8TestInterface::valuesMethodCallback, 0, v8::None, V8DOMConfigur
ation::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNo
tCheckAccess, V8DOMConfiguration::kAllWorlds}, | 3019 {"values", V8TestInterface::valuesMethodCallback, 0, v8::None, V8DOMConfigur
ation::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNo
tCheckAccess, V8DOMConfiguration::kAllWorlds}, |
| 3038 {"entries", V8TestInterface::entriesMethodCallback, 0, v8::None, V8DOMConfig
uration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDo
NotCheckAccess, V8DOMConfiguration::kAllWorlds}, | |
| 3039 {"forEach", V8TestInterface::forEachMethodCallback, 1, v8::None, V8DOMConfig
uration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDo
NotCheckAccess, V8DOMConfiguration::kAllWorlds}, | 3020 {"forEach", V8TestInterface::forEachMethodCallback, 1, v8::None, V8DOMConfig
uration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDo
NotCheckAccess, V8DOMConfiguration::kAllWorlds}, |
| 3040 {"toJSON", V8TestInterface::toJSONMethodCallback, 0, static_cast<v8::Propert
yAttribute>(v8::DontEnum), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration:
:kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWo
rlds}, | 3021 {"toJSON", V8TestInterface::toJSONMethodCallback, 0, static_cast<v8::Propert
yAttribute>(v8::DontEnum), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration:
:kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWo
rlds}, |
| 3041 {"toString", V8TestInterface::toStringMethodCallback, 0, static_cast<v8::Pro
pertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnPrototype, V8DOMConfigurat
ion::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kA
llWorlds}, | 3022 {"toString", V8TestInterface::toStringMethodCallback, 0, static_cast<v8::Pro
pertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnPrototype, V8DOMConfigurat
ion::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kA
llWorlds}, |
| 3042 }; | 3023 }; |
| 3043 | 3024 |
| 3044 void V8TestInterface::installV8TestInterfaceTemplate(v8::Isolate* isolate, const
DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { | 3025 void V8TestInterface::installV8TestInterfaceTemplate(v8::Isolate* isolate, const
DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { |
| 3045 // Initialize the interface object's template. | 3026 // Initialize the interface object's template. |
| 3046 V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate,
V8TestInterface::wrapperTypeInfo.interface_name, V8TestInterfaceEmpty::domTempl
ate(isolate, world), V8TestInterface::internalFieldCount); | 3027 V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate,
V8TestInterface::wrapperTypeInfo.interface_name, V8TestInterfaceEmpty::domTempl
ate(isolate, world), V8TestInterface::internalFieldCount); |
| 3047 | 3028 |
| 3048 if (!RuntimeEnabledFeatures::featureNameEnabled()) { | 3029 if (!RuntimeEnabledFeatures::featureNameEnabled()) { |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3135 } | 3116 } |
| 3136 | 3117 |
| 3137 // Indexed properties | 3118 // Indexed properties |
| 3138 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestInt
erface::indexedPropertyGetterCallback, V8TestInterface::indexedPropertySetterCal
lback, nullptr, V8TestInterface::indexedPropertyDeleterCallback, IndexedProperty
Enumerator<TestInterfaceImplementation>, v8::Local<v8::Value>(), v8::PropertyHan
dlerFlags::kNone); | 3119 v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestInt
erface::indexedPropertyGetterCallback, V8TestInterface::indexedPropertySetterCal
lback, nullptr, V8TestInterface::indexedPropertyDeleterCallback, IndexedProperty
Enumerator<TestInterfaceImplementation>, v8::Local<v8::Value>(), v8::PropertyHan
dlerFlags::kNone); |
| 3139 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); | 3120 instanceTemplate->SetHandler(indexedPropertyHandlerConfig); |
| 3140 // Named properties | 3121 // Named properties |
| 3141 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(V8TestInterfa
ce::namedPropertyGetterCallback, V8TestInterface::namedPropertySetterCallback, V
8TestInterface::namedPropertyQueryCallback, V8TestInterface::namedPropertyDelete
rCallback, V8TestInterface::namedPropertyEnumeratorCallback, v8::Local<v8::Value
>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyIn
terceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking))); | 3122 v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(V8TestInterfa
ce::namedPropertyGetterCallback, V8TestInterface::namedPropertySetterCallback, V
8TestInterface::namedPropertyQueryCallback, V8TestInterface::namedPropertyDelete
rCallback, V8TestInterface::namedPropertyEnumeratorCallback, v8::Local<v8::Value
>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyIn
terceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking))); |
| 3142 instanceTemplate->SetHandler(namedPropertyHandlerConfig); | 3123 instanceTemplate->SetHandler(namedPropertyHandlerConfig); |
| 3143 | 3124 |
| 3144 // Iterator (@@iterator) | 3125 // Iterator (@@iterator) |
| 3145 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIte
ratorConfiguration = { v8::Symbol::GetIterator, V8TestInterface::iteratorMethodC
allback, 0, v8::DontEnum, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::
kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess }; | 3126 static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIte
ratorConfiguration = { v8::Symbol::GetIterator, "entries", V8TestInterface::iter
atorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::kOnPrototype, V8DOMConf
iguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess }; |
| 3146 V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature
, symbolKeyedIteratorConfiguration); | 3127 V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature
, symbolKeyedIteratorConfiguration); |
| 3147 | 3128 |
| 3148 instanceTemplate->SetCallAsFunctionHandler(V8TestInterface::legacyCallCustom); | 3129 instanceTemplate->SetCallAsFunctionHandler(V8TestInterface::legacyCallCustom); |
| 3149 | 3130 |
| 3150 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { | 3131 if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { |
| 3151 const V8DOMConfiguration::MethodConfiguration implements2VoidMethodMethodCon
figuration[] = { | 3132 const V8DOMConfiguration::MethodConfiguration implements2VoidMethodMethodCon
figuration[] = { |
| 3152 {"implements2VoidMethod", V8TestInterface::implements2VoidMethodMethodCall
back, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckH
older, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds} | 3133 {"implements2VoidMethod", V8TestInterface::implements2VoidMethodMethodCall
back, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckH
older, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds} |
| 3153 }; | 3134 }; |
| 3154 for (const auto& methodConfig : implements2VoidMethodMethodConfiguration) | 3135 for (const auto& methodConfig : implements2VoidMethodMethodConfiguration) |
| 3155 V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, protot
ypeTemplate, interfaceTemplate, signature, methodConfig); | 3136 V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, protot
ypeTemplate, interfaceTemplate, signature, methodConfig); |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3578 | 3559 |
| 3579 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { | 3560 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { |
| 3580 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInter
face = method; | 3561 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInter
face = method; |
| 3581 } | 3562 } |
| 3582 | 3563 |
| 3583 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { | 3564 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { |
| 3584 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPartia
lInterface = method; | 3565 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPartia
lInterface = method; |
| 3585 } | 3566 } |
| 3586 | 3567 |
| 3587 } // namespace blink | 3568 } // namespace blink |
| OLD | NEW |