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 #include "V8TestInterfacePartial.h" | 7 #include "V8TestInterfacePartial.h" |
8 | 8 |
9 #include "bindings/core/v8/ExceptionState.h" | 9 #include "bindings/core/v8/ExceptionState.h" |
10 #include "bindings/core/v8/PrivateScriptRunner.h" | 10 #include "bindings/core/v8/PrivateScriptRunner.h" |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUn
signedShort}, | 377 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUn
signedShort}, |
378 }; | 378 }; |
379 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototy
peTemplate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)
); | 379 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototy
peTemplate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)
); |
380 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, pro
totypeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_
LENGTH(V8TestInterfaceMethods)); | 380 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, pro
totypeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_
LENGTH(V8TestInterfaceMethods)); |
381 } | 381 } |
382 } | 382 } |
383 | 383 |
384 | 384 |
385 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState, v8::Local<v8::Object> instance) | 385 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState, v8::Local<v8::Object> instance) |
386 { | 386 { |
387 v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(scriptS
tate->isolate()); | 387 v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestInterface::wrapper
TypeInfo.domTemplate(scriptState->isolate(), scriptState->world()); |
388 | |
389 V8PerIsolateData* perIsolateData = V8PerIsolateData::from(scriptState->isola
te()); | |
390 v8::Local<v8::FunctionTemplate> interfaceTemplate = perIsolateData->findInte
rfaceTemplate(scriptState->world(), &V8TestInterface::wrapperTypeInfo); | |
391 v8::Local<v8::Signature> signature = v8::Signature::New(scriptState->isolate
(), interfaceTemplate); | 388 v8::Local<v8::Signature> signature = v8::Signature::New(scriptState->isolate
(), interfaceTemplate); |
392 ALLOW_UNUSED_LOCAL(signature); | 389 ALLOW_UNUSED_LOCAL(signature); |
393 V8PerContextData* perContextData = V8PerContextData::from(scriptState->conte
xt()); | 390 V8PerContextData* perContextData = V8PerContextData::from(scriptState->conte
xt()); |
| 391 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestIn
terface::wrapperTypeInfo); |
394 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Te
stInterface::wrapperTypeInfo); | 392 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Te
stInterface::wrapperTypeInfo); |
395 ALLOW_UNUSED_LOCAL(interface); | 393 ALLOW_UNUSED_LOCAL(interface); |
396 const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttribut
eConfiguration = \ | 394 const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttribut
eConfiguration = \ |
397 {"partial4LongAttribute", TestInterfaceImplementationPartialV8Internal::
partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementationPartial
V8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT,
static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllSc
ripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; | 395 {"partial4LongAttribute", TestInterfaceImplementationPartialV8Internal::
partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementationPartial
V8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT,
static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllSc
ripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; |
398 V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->wor
ld(), instance, prototype, interface, signature, accessorpartial4LongAttributeCo
nfiguration); | 396 V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->wor
ld(), instance, prototype, interface, signature, accessorpartial4LongAttributeCo
nfiguration); |
399 const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAt
tributeConfiguration = \ | 397 const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAt
tributeConfiguration = \ |
400 {"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}; | 398 {"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}; |
401 V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->wor
ld(), instance, prototype, interface, signature, accessorpartial4StaticLongAttri
buteConfiguration); | 399 V8DOMConfiguration::installAccessor(scriptState->isolate(), scriptState->wor
ld(), instance, prototype, interface, signature, accessorpartial4StaticLongAttri
buteConfiguration); |
402 const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShor
tConfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantT
ypeUnsignedShort}; | 400 const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShor
tConfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantT
ypeUnsignedShort}; |
403 V8DOMConfiguration::installConstant(scriptState->isolate(), interface, proto
type, constantPartial4UnsignedShortConfiguration); | 401 V8DOMConfiguration::installConstant(scriptState->isolate(), interface, proto
type, constantPartial4UnsignedShortConfiguration); |
404 const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfig
uration = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::p
artial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAl
lScripts, V8DOMConfiguration::OnPrototype}; | 402 const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfig
uration = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::p
artial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAl
lScripts, V8DOMConfiguration::OnPrototype}; |
405 V8DOMConfiguration::installMethod(scriptState->isolate(), scriptState->world
(), instance, prototype, interface, signature, methodPartial4VoidmethodConfigura
tion); | 403 V8DOMConfiguration::installMethod(scriptState->isolate(), scriptState->world
(), instance, prototype, interface, signature, methodPartial4VoidmethodConfigura
tion); |
406 } | 404 } |
| 405 |
| 406 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState) |
| 407 { |
| 408 installOriginTrialPartialFeature(scriptState, v8::Local<v8::Object>()); |
| 409 } |
407 void V8TestInterfacePartial::preparePrototypeAndInterfaceObject(v8::Local<v8::Co
ntext> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObj
ect, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> in
terfaceTemplate) | 410 void V8TestInterfacePartial::preparePrototypeAndInterfaceObject(v8::Local<v8::Co
ntext> context, const DOMWrapperWorld& world, v8::Local<v8::Object> prototypeObj
ect, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> in
terfaceTemplate) |
408 { | 411 { |
409 V8TestInterface::preparePrototypeAndInterfaceObject(context, world, prototyp
eObject, interfaceObject, interfaceTemplate); | 412 V8TestInterface::preparePrototypeAndInterfaceObject(context, world, prototyp
eObject, interfaceObject, interfaceTemplate); |
410 v8::Isolate* isolate = context->GetIsolate(); | 413 v8::Isolate* isolate = context->GetIsolate(); |
411 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); | 414 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); |
412 v8::Local<v8::Object> unscopeables; | 415 v8::Local<v8::Object> unscopeables; |
413 if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol
))) | 416 if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol
))) |
414 unscopeables = prototypeObject->Get(context, unscopablesSymbol).ToLocalC
hecked().As<v8::Object>(); | 417 unscopeables = prototypeObject->Get(context, unscopablesSymbol).ToLocalC
hecked().As<v8::Object>(); |
415 else | 418 else |
416 unscopeables = v8::Object::New(isolate); | 419 unscopeables = v8::Object::New(isolate); |
417 unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeab
leVoidMethod"), v8::True(isolate)).FromJust(); | 420 unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeab
leVoidMethod"), v8::True(isolate)).FromJust(); |
418 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopeables
).FromJust(); | 421 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopeables
).FromJust(); |
419 } | 422 } |
420 | 423 |
421 void V8TestInterfacePartial::initialize() | 424 void V8TestInterfacePartial::initialize() |
422 { | 425 { |
423 // Should be invoked from ModulesInitializer. | 426 // Should be invoked from ModulesInitializer. |
424 V8TestInterface::updateWrapperTypeInfo( | 427 V8TestInterface::updateWrapperTypeInfo( |
425 &V8TestInterfacePartial::installV8TestInterfaceTemplate, | 428 &V8TestInterfacePartial::installV8TestInterfaceTemplate, |
426 &V8TestInterfacePartial::preparePrototypeAndInterfaceObject); | 429 &V8TestInterfacePartial::preparePrototypeAndInterfaceObject); |
427 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); | 430 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(
&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); |
428 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); | 431 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte
rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver
loadMethod); |
429 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); | 432 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa
ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe
thod); |
430 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); | 433 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI
nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti
alOverloadMethod); |
431 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); | 434 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn
terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); |
432 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); | 435 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&
TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); |
433 } | 436 } |
434 | 437 |
435 } // namespace blink | 438 } // namespace blink |
OLD | NEW |