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 // clang-format off | 8 // clang-format off |
9 #include "V8TestInterfacePartial.h" | 9 #include "V8TestInterfacePartial.h" |
10 | 10 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 150 |
151 if (isArityError) { | 151 if (isArityError) { |
152 } | 152 } |
153 exceptionState.throwTypeError("No function was found that matched the signatur
e provided."); | 153 exceptionState.throwTypeError("No function was found that matched the signatur
e provided."); |
154 } | 154 } |
155 | 155 |
156 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) { | 156 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) { |
157 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface", "promiseMethodPartialOverload"); | 157 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCont
ext, "TestInterface", "promiseMethodPartialOverload"); |
158 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); | 158 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); |
159 | 159 |
| 160 // V8DOMConfiguration::DoNotCheckHolder |
| 161 // Make sure that info.Holder() really points to an instance of the type. |
| 162 if (!V8TestInterface::hasInstance(info.Holder(), info.GetIsolate())) { |
| 163 exceptionState.throwTypeError("Illegal invocation"); |
| 164 return; |
| 165 } |
160 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 166 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
161 | 167 |
162 Document* document; | 168 Document* document; |
163 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 169 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
164 if (!document) { | 170 if (!document) { |
165 exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); | 171 exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); |
166 | 172 |
167 return; | 173 return; |
168 } | 174 } |
169 | 175 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 TestInterfacePartial4::partial4StaticVoidMethod(); | 369 TestInterfacePartial4::partial4StaticVoidMethod(); |
364 } | 370 } |
365 | 371 |
366 void partial4StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) { | 372 void partial4StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) { |
367 TestInterfaceImplementationPartialV8Internal::partial4StaticVoidMethodMethod(i
nfo); | 373 TestInterfaceImplementationPartialV8Internal::partial4StaticVoidMethodMethod(i
nfo); |
368 } | 374 } |
369 | 375 |
370 } // namespace TestInterfaceImplementationPartialV8Internal | 376 } // namespace TestInterfaceImplementationPartialV8Internal |
371 | 377 |
372 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { | 378 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { |
373 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8
Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, | 379 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8
Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConf
iguration::CheckHolder}, |
374 {"unscopableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsco
pableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnPrototype}, | 380 {"unscopableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsco
pableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
375 }; | 381 }; |
376 | 382 |
377 void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Isolate* isolate
, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplat
e) { | 383 void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Isolate* isolate
, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplat
e) { |
378 // Initialize the interface object's template. | 384 // Initialize the interface object's template. |
379 V8TestInterface::installV8TestInterfaceTemplate(isolate, world, interfaceTempl
ate); | 385 V8TestInterface::installV8TestInterfaceTemplate(isolate, world, interfaceTempl
ate); |
380 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 386 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
381 ALLOW_UNUSED_LOCAL(signature); | 387 ALLOW_UNUSED_LOCAL(signature); |
382 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); | 388 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); |
383 ALLOW_UNUSED_LOCAL(instanceTemplate); | 389 ALLOW_UNUSED_LOCAL(instanceTemplate); |
384 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); | 390 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); |
(...skipping 11 matching lines...) Expand all Loading... |
396 void V8TestInterfacePartial::installOriginTrialPartialFeature(v8::Isolate* isola
te, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::
Object> prototype, v8::Local<v8::Function> interface) { | 402 void V8TestInterfacePartial::installOriginTrialPartialFeature(v8::Isolate* isola
te, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::
Object> prototype, v8::Local<v8::Function> interface) { |
397 v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestInterface::wrapperTy
peInfo.domTemplate(isolate, world); | 403 v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestInterface::wrapperTy
peInfo.domTemplate(isolate, world); |
398 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 404 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
399 ALLOW_UNUSED_LOCAL(signature); | 405 ALLOW_UNUSED_LOCAL(signature); |
400 const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttributeC
onfiguration = {"partial4LongAttribute", TestInterfaceImplementationPartialV8Int
ernal::partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementation
PartialV8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, nullptr,
0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration
::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::Chec
kHolder}; | 406 const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttributeC
onfiguration = {"partial4LongAttribute", TestInterfaceImplementationPartialV8Int
ernal::partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementation
PartialV8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, nullptr,
0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration
::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::Chec
kHolder}; |
401 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, inter
face, signature, accessorpartial4LongAttributeConfiguration); | 407 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, inter
face, signature, accessorpartial4LongAttributeConfiguration); |
402 const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAttr
ibuteConfiguration = {"partial4StaticLongAttribute", TestInterfaceImplementation
PartialV8Internal::partial4StaticLongAttributeAttributeGetterCallback, TestInter
faceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeSetterC
allback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::N
one), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface,
V8DOMConfiguration::CheckHolder}; | 408 const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAttr
ibuteConfiguration = {"partial4StaticLongAttribute", TestInterfaceImplementation
PartialV8Internal::partial4StaticLongAttributeAttributeGetterCallback, TestInter
faceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeSetterC
allback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::N
one), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface,
V8DOMConfiguration::CheckHolder}; |
403 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, inter
face, signature, accessorpartial4StaticLongAttributeConfiguration); | 409 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, inter
face, signature, accessorpartial4StaticLongAttributeConfiguration); |
404 const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShortC
onfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantTyp
eUnsignedShort}; | 410 const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShortC
onfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantTyp
eUnsignedShort}; |
405 V8DOMConfiguration::installConstant(isolate, interface, prototype, constantPar
tial4UnsignedShortConfiguration); | 411 V8DOMConfiguration::installConstant(isolate, interface, prototype, constantPar
tial4UnsignedShortConfiguration); |
406 const V8DOMConfiguration::MethodConfiguration methodPartial4StaticvoidmethodCo
nfiguration = {"partial4StaticVoidMethod", TestInterfaceImplementationPartialV8I
nternal::partial4StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; | 412 const V8DOMConfiguration::MethodConfiguration methodPartial4StaticvoidmethodCo
nfiguration = {"partial4StaticVoidMethod", TestInterfaceImplementationPartialV8I
nternal::partial4StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfigurat
ion::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::C
heckHolder}; |
407 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa
ce, signature, methodPartial4StaticvoidmethodConfiguration); | 413 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa
ce, signature, methodPartial4StaticvoidmethodConfiguration); |
408 const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfigur
ation = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::par
tial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnPrototype}; | 414 const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfigur
ation = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::par
tial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
409 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa
ce, signature, methodPartial4VoidmethodConfiguration); | 415 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa
ce, signature, methodPartial4VoidmethodConfiguration); |
410 } | 416 } |
411 | 417 |
412 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState, v8::Local<v8::Object> instance) { | 418 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState, v8::Local<v8::Object> instance) { |
413 V8PerContextData* perContextData = V8PerContextData::from(scriptState->context
()); | 419 V8PerContextData* perContextData = V8PerContextData::from(scriptState->context
()); |
414 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestInte
rface::wrapperTypeInfo); | 420 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestInte
rface::wrapperTypeInfo); |
415 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Test
Interface::wrapperTypeInfo); | 421 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Test
Interface::wrapperTypeInfo); |
416 ALLOW_UNUSED_LOCAL(interface); | 422 ALLOW_UNUSED_LOCAL(interface); |
417 installOriginTrialPartialFeature(scriptState->isolate(), scriptState->world(),
instance, prototype, interface); | 423 installOriginTrialPartialFeature(scriptState->isolate(), scriptState->world(),
instance, prototype, interface); |
418 } | 424 } |
(...skipping 22 matching lines...) Expand all Loading... |
441 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); | 447 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); |
442 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(&T
estInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); | 448 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(&T
estInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); |
443 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterf
ace(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOverlo
adMethod); | 449 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterf
ace(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOverlo
adMethod); |
444 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterface
(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMeth
od); | 450 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterface
(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMeth
od); |
445 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialInt
erface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodPartial
OverloadMethod); | 451 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialInt
erface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodPartial
OverloadMethod); |
446 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestInte
rfaceImplementationPartialV8Internal::partial2VoidMethodMethod); | 452 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestInte
rfaceImplementationPartialV8Internal::partial2VoidMethodMethod); |
447 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&Te
stInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); | 453 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&Te
stInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); |
448 } | 454 } |
449 | 455 |
450 } // namespace blink | 456 } // namespace blink |
OLD | NEW |