| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 382 |
| 383 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) { |
| 384 // Initialize the interface object's template. | 384 // Initialize the interface object's template. |
| 385 V8TestInterface::installV8TestInterfaceTemplate(isolate, world, interfaceTempl
ate); | 385 V8TestInterface::installV8TestInterfaceTemplate(isolate, world, interfaceTempl
ate); |
| 386 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); | 386 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp
late); |
| 387 ALLOW_UNUSED_LOCAL(signature); | 387 ALLOW_UNUSED_LOCAL(signature); |
| 388 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); | 388 v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTe
mplate(); |
| 389 ALLOW_UNUSED_LOCAL(instanceTemplate); | 389 ALLOW_UNUSED_LOCAL(instanceTemplate); |
| 390 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); | 390 v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->Prototype
Template(); |
| 391 ALLOW_UNUSED_LOCAL(prototypeTemplate); | 391 ALLOW_UNUSED_LOCAL(prototypeTemplate); |
| 392 |
| 392 // Register DOM constants, attributes and operations. | 393 // Register DOM constants, attributes and operations. |
| 393 if (RuntimeEnabledFeatures::featureNameEnabled()) { | 394 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 394 const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants[]
= { | 395 const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants[]
= { |
| 395 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsi
gnedShort}, | 396 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsi
gnedShort}, |
| 396 }; | 397 }; |
| 397 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototype
Template, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)); | 398 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototype
Template, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)); |
| 398 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, proto
typeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_LE
NGTH(V8TestInterfaceMethods)); | 399 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, proto
typeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_LE
NGTH(V8TestInterfaceMethods)); |
| 399 } | 400 } |
| 400 } | 401 } |
| 401 | 402 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 419 V8PerContextData* perContextData = V8PerContextData::from(scriptState->context
()); | 420 V8PerContextData* perContextData = V8PerContextData::from(scriptState->context
()); |
| 420 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestInte
rface::wrapperTypeInfo); | 421 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestInte
rface::wrapperTypeInfo); |
| 421 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Test
Interface::wrapperTypeInfo); | 422 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Test
Interface::wrapperTypeInfo); |
| 422 ALLOW_UNUSED_LOCAL(interface); | 423 ALLOW_UNUSED_LOCAL(interface); |
| 423 installOriginTrialPartialFeature(scriptState->isolate(), scriptState->world(),
instance, prototype, interface); | 424 installOriginTrialPartialFeature(scriptState->isolate(), scriptState->world(),
instance, prototype, interface); |
| 424 } | 425 } |
| 425 | 426 |
| 426 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState) { | 427 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip
tState) { |
| 427 installOriginTrialPartialFeature(scriptState, v8::Local<v8::Object>()); | 428 installOriginTrialPartialFeature(scriptState, v8::Local<v8::Object>()); |
| 428 } | 429 } |
| 430 |
| 429 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) { | 431 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) { |
| 430 #error No one is currently using a partial interface with context-dependent prop
erties. If you\'re planning to use it, please consult with the binding team: <b
link-reviews-bindings@chromium.org> | 432 #error No one is currently using a partial interface with context-dependent prop
erties. If you\'re planning to use it, please consult with the binding team: <b
link-reviews-bindings@chromium.org> |
| 431 V8TestInterface::preparePrototypeAndInterfaceObject(context, world, prototypeO
bject, interfaceObject, interfaceTemplate); | 433 V8TestInterface::preparePrototypeAndInterfaceObject(context, world, prototypeO
bject, interfaceObject, interfaceTemplate); |
| 432 v8::Isolate* isolate = context->GetIsolate(); | 434 v8::Isolate* isolate = context->GetIsolate(); |
| 433 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); | 435 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); |
| 434 v8::Local<v8::Object> unscopables; | 436 v8::Local<v8::Object> unscopables; |
| 435 if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol))
) | 437 if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol))
) |
| 436 unscopables = prototypeObject->Get(context, unscopablesSymbol).ToLocalChecke
d().As<v8::Object>(); | 438 unscopables = prototypeObject->Get(context, unscopablesSymbol).ToLocalChecke
d().As<v8::Object>(); |
| 437 else | 439 else |
| 438 unscopables = v8::Object::New(isolate); | 440 unscopables = v8::Object::New(isolate); |
| 439 unscopables->CreateDataProperty(context, v8AtomicString(isolate, "unscopableVo
idMethod"), v8::True(isolate)).FromJust(); | 441 unscopables->CreateDataProperty(context, v8AtomicString(isolate, "unscopableVo
idMethod"), v8::True(isolate)).FromJust(); |
| 440 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).F
romJust(); | 442 prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).F
romJust(); |
| 441 } | 443 } |
| 442 | 444 |
| 443 void V8TestInterfacePartial::initialize() { | 445 void V8TestInterfacePartial::initialize() { |
| 444 // Should be invoked from ModulesInitializer. | 446 // Should be invoked from ModulesInitializer. |
| 445 V8TestInterface::updateWrapperTypeInfo( | 447 V8TestInterface::updateWrapperTypeInfo( |
| 446 &V8TestInterfacePartial::installV8TestInterfaceTemplate, | 448 &V8TestInterfacePartial::installV8TestInterfaceTemplate, |
| 447 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); | 449 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); |
| 448 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(&T
estInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); | 450 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(&T
estInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); |
| 449 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterf
ace(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOverlo
adMethod); | 451 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterf
ace(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOverlo
adMethod); |
| 450 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterface
(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMeth
od); | 452 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterface
(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMeth
od); |
| 451 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialInt
erface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodPartial
OverloadMethod); | 453 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialInt
erface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodPartial
OverloadMethod); |
| 452 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestInte
rfaceImplementationPartialV8Internal::partial2VoidMethodMethod); | 454 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestInte
rfaceImplementationPartialV8Internal::partial2VoidMethodMethod); |
| 453 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&Te
stInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); | 455 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&Te
stInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); |
| 454 } | 456 } |
| 455 | 457 |
| 456 } // namespace blink | 458 } // namespace blink |
| OLD | NEW |