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. DO NOT MODIFY! | 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! |
6 | 6 |
7 // clang-format off | 7 // clang-format off |
8 #include "V8TestInterfacePartial.h" | 8 #include "V8TestInterfacePartial.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 if (isArityError) { | 162 if (isArityError) { |
163 } | 163 } |
164 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); | 164 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
165 } | 165 } |
166 | 166 |
167 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) | 167 static void promiseMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v
8::Value>& info) |
168 { | 168 { |
169 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "promiseMethodPartialOverload"); | 169 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionCo
ntext, "TestInterface", "promiseMethodPartialOverload"); |
170 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); | 170 ExceptionToRejectPromiseScope rejectPromiseScope(info, exceptionState); |
171 | 171 |
| 172 // V8DOMConfiguration::DoNotCheckHolder |
| 173 // Make sure that info.Holder() really points to an instance of the type. |
| 174 if (!V8TestInterface::hasInstance(info.Holder(), info.GetIsolate())) { |
| 175 exceptionState.throwTypeError("Illegal invocation"); |
| 176 return; |
| 177 } |
| 178 |
172 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 179 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
173 | 180 |
174 Document* document; | 181 Document* document; |
175 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); | 182 document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); |
176 if (!document) { | 183 if (!document) { |
177 exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); | 184 exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); |
178 | 185 |
179 return; | 186 return; |
180 } | 187 } |
181 | 188 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 } | 398 } |
392 | 399 |
393 void partial4StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) | 400 void partial4StaticVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::V
alue>& info) |
394 { | 401 { |
395 TestInterfaceImplementationPartialV8Internal::partial4StaticVoidMethodMethod
(info); | 402 TestInterfaceImplementationPartialV8Internal::partial4StaticVoidMethodMethod
(info); |
396 } | 403 } |
397 | 404 |
398 } // namespace TestInterfaceImplementationPartialV8Internal | 405 } // namespace TestInterfaceImplementationPartialV8Internal |
399 | 406 |
400 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { | 407 const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { |
401 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8
Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype}, | 408 {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8
Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8D
OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConf
iguration::CheckHolder}, |
402 {"unscopableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsco
pableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnPrototype}, | 409 {"unscopableVoidMethod", TestInterfaceImplementationPartialV8Internal::unsco
pableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS
cripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, |
403 }; | 410 }; |
404 | 411 |
405 void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Isolate* isolate
, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplat
e) | 412 void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Isolate* isolate
, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplat
e) |
406 { | 413 { |
407 // Initialize the interface object's template. | 414 // Initialize the interface object's template. |
408 V8TestInterface::installV8TestInterfaceTemplate(isolate, world, interfaceTem
plate); | 415 V8TestInterface::installV8TestInterfaceTemplate(isolate, world, interfaceTem
plate); |
409 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe
mplate); | 416 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe
mplate); |
410 ALLOW_UNUSED_LOCAL(signature); | 417 ALLOW_UNUSED_LOCAL(signature); |
411 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->Instance
Template(); | 418 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->Instance
Template(); |
412 ALLOW_UNUSED_LOCAL(instanceTemplate); | 419 ALLOW_UNUSED_LOCAL(instanceTemplate); |
(...skipping 15 matching lines...) Expand all Loading... |
428 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe
mplate); | 435 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTe
mplate); |
429 ALLOW_UNUSED_LOCAL(signature); | 436 ALLOW_UNUSED_LOCAL(signature); |
430 const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttribut
eConfiguration = \ | 437 const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttribut
eConfiguration = \ |
431 {"partial4LongAttribute", TestInterfaceImplementationPartialV8Internal::
partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementationPartial
V8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT,
static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllSc
ripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 438 {"partial4LongAttribute", TestInterfaceImplementationPartialV8Internal::
partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementationPartial
V8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT,
static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllSc
ripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
432 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, int
erface, signature, accessorpartial4LongAttributeConfiguration); | 439 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, int
erface, signature, accessorpartial4LongAttributeConfiguration); |
433 const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAt
tributeConfiguration = \ | 440 const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAt
tributeConfiguration = \ |
434 {"partial4StaticLongAttribute", TestInterfaceImplementationPartialV8Inte
rnal::partial4StaticLongAttributeAttributeGetterCallback, TestInterfaceImplement
ationPartialV8Internal::partial4StaticLongAttributeAttributeSetterCallback, 0, 0
, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurati
on::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::Ch
eckHolder}; | 441 {"partial4StaticLongAttribute", TestInterfaceImplementationPartialV8Inte
rnal::partial4StaticLongAttributeAttributeGetterCallback, TestInterfaceImplement
ationPartialV8Internal::partial4StaticLongAttributeAttributeSetterCallback, 0, 0
, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfigurati
on::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::Ch
eckHolder}; |
435 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, int
erface, signature, accessorpartial4StaticLongAttributeConfiguration); | 442 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, int
erface, signature, accessorpartial4StaticLongAttributeConfiguration); |
436 const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShor
tConfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantT
ypeUnsignedShort}; | 443 const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShor
tConfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantT
ypeUnsignedShort}; |
437 V8DOMConfiguration::installConstant(isolate, interface, prototype, constantP
artial4UnsignedShortConfiguration); | 444 V8DOMConfiguration::installConstant(isolate, interface, prototype, constantP
artial4UnsignedShortConfiguration); |
438 const V8DOMConfiguration::MethodConfiguration methodPartial4Staticvoidmethod
Configuration = {"partial4StaticVoidMethod", TestInterfaceImplementationPartialV
8Internal::partial4StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfigur
ation::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; | 445 const V8DOMConfiguration::MethodConfiguration methodPartial4Staticvoidmethod
Configuration = {"partial4StaticVoidMethod", TestInterfaceImplementationPartialV
8Internal::partial4StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfigur
ation::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration:
:CheckHolder}; |
439 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, inter
face, signature, methodPartial4StaticvoidmethodConfiguration); | 446 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, inter
face, signature, methodPartial4StaticvoidmethodConfiguration); |
440 const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfig
uration = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::p
artial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAl
lScripts, V8DOMConfiguration::OnPrototype}; | 447 const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfig
uration = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::p
artial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAl
lScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
441 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, inter
face, signature, methodPartial4VoidmethodConfiguration); | 448 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, inter
face, signature, methodPartial4VoidmethodConfiguration); |
442 } | 449 } |
443 | 450 |
444 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState, v8::Local<v8::Object> instance) | 451 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState, v8::Local<v8::Object> instance) |
445 { | 452 { |
446 V8PerContextData* perContextData = V8PerContextData::from(scriptState->conte
xt()); | 453 V8PerContextData* perContextData = V8PerContextData::from(scriptState->conte
xt()); |
447 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestIn
terface::wrapperTypeInfo); | 454 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestIn
terface::wrapperTypeInfo); |
448 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Te
stInterface::wrapperTypeInfo); | 455 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Te
stInterface::wrapperTypeInfo); |
449 ALLOW_UNUSED_LOCAL(interface); | 456 ALLOW_UNUSED_LOCAL(interface); |
450 installOriginTrialPartialFeature(scriptState->isolate(), scriptState->world(
), instance, prototype, interface); | 457 installOriginTrialPartialFeature(scriptState->isolate(), scriptState->world(
), instance, prototype, interface); |
(...skipping 26 matching lines...) Expand all Loading... |
477 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); | 484 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); |
478 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); | 485 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); |
479 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); | 486 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); |
480 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); | 487 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); |
481 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); | 488 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); |
482 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); | 489 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); |
483 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); | 490 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); |
484 } | 491 } |
485 | 492 |
486 } // namespace blink | 493 } // namespace blink |
OLD | NEW |