Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp

Issue 2458183002: Eagerly install Origin Trial features on window (Closed)
Patch Set: Use correct context and enter it before installing attributes on window Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 // Register DOM constants, attributes and operations. 385 // Register DOM constants, attributes and operations.
386 if (RuntimeEnabledFeatures::featureNameEnabled()) { 386 if (RuntimeEnabledFeatures::featureNameEnabled()) {
387 const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants[] = { 387 const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants[] = {
388 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsi gnedShort}, 388 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::ConstantTypeUnsi gnedShort},
389 }; 389 };
390 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototype Template, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)); 390 V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototype Template, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants));
391 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, proto typeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_LE NGTH(V8TestInterfaceMethods)); 391 V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, proto typeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_LE NGTH(V8TestInterfaceMethods));
392 } 392 }
393 } 393 }
394 394
395 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) { 395 void V8TestInterfacePartial::installOriginTrialPartialFeature(const ScriptState* scriptState, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v 8::Local<v8::Function> interface) {
396 v8::Isolate* isolate = scriptState->isolate();
397 const DOMWrapperWorld& world = scriptState->world();
396 v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestInterface::wrapperTy peInfo.domTemplate(isolate, world); 398 v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestInterface::wrapperTy peInfo.domTemplate(isolate, world);
397 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late); 399 v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemp late);
398 ALLOW_UNUSED_LOCAL(signature); 400 ALLOW_UNUSED_LOCAL(signature);
399 const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttributeC onfiguration = {"partial4LongAttribute", TestInterfaceImplementationPartialV8Int ernal::partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementation PartialV8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, 0, v8::DE FAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed ToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; 401 const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttributeC onfiguration = {"partial4LongAttribute", TestInterfaceImplementationPartialV8Int ernal::partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementation PartialV8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, 0, v8::DE FAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::Exposed ToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
400 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, inter face, signature, accessorpartial4LongAttributeConfiguration); 402 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, inter face, signature, accessorpartial4LongAttributeConfiguration);
401 const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAttr ibuteConfiguration = {"partial4StaticLongAttribute", TestInterfaceImplementation PartialV8Internal::partial4StaticLongAttributeAttributeGetterCallback, TestInter faceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeSetterC allback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConf iguration::CheckHolder}; 403 const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAttr ibuteConfiguration = {"partial4StaticLongAttribute", TestInterfaceImplementation PartialV8Internal::partial4StaticLongAttributeAttributeGetterCallback, TestInter faceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeSetterC allback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8D OMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConf iguration::CheckHolder};
402 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, inter face, signature, accessorpartial4StaticLongAttributeConfiguration); 404 V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, inter face, signature, accessorpartial4StaticLongAttributeConfiguration);
403 const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShortC onfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantTyp eUnsignedShort}; 405 const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShortC onfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantTyp eUnsignedShort};
404 V8DOMConfiguration::installConstant(isolate, interface, prototype, constantPar tial4UnsignedShortConfiguration); 406 V8DOMConfiguration::installConstant(isolate, interface, prototype, constantPar tial4UnsignedShortConfiguration);
405 const V8DOMConfiguration::MethodConfiguration methodPartial4StaticvoidmethodCo nfiguration = {"partial4StaticVoidMethod", TestInterfaceImplementationPartialV8I nternal::partial4StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnInterface}; 407 const V8DOMConfiguration::MethodConfiguration methodPartial4StaticvoidmethodCo nfiguration = {"partial4StaticVoidMethod", TestInterfaceImplementationPartialV8I nternal::partial4StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfigurat ion::ExposedToAllScripts, V8DOMConfiguration::OnInterface};
406 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa ce, signature, methodPartial4StaticvoidmethodConfiguration); 408 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa ce, signature, methodPartial4StaticvoidmethodConfiguration);
407 const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfigur ation = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::par tial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS cripts, V8DOMConfiguration::OnPrototype}; 409 const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfigur ation = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::par tial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllS cripts, V8DOMConfiguration::OnPrototype};
408 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa ce, signature, methodPartial4VoidmethodConfiguration); 410 V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interfa ce, signature, methodPartial4VoidmethodConfiguration);
409 } 411 }
410 412
411 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip tState, v8::Local<v8::Object> instance) { 413 void V8TestInterfacePartial::installOriginTrialPartialFeature(const ScriptState* scriptState, v8::Local<v8::Object> instance) {
412 V8PerContextData* perContextData = V8PerContextData::from(scriptState->context ()); 414 V8PerContextData* perContextData = V8PerContextData::from(scriptState->context ());
413 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestInte rface::wrapperTypeInfo); 415 v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestInte rface::wrapperTypeInfo);
414 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Test Interface::wrapperTypeInfo); 416 v8::Local<v8::Function> interface = perContextData->constructorForType(&V8Test Interface::wrapperTypeInfo);
415 ALLOW_UNUSED_LOCAL(interface); 417 ALLOW_UNUSED_LOCAL(interface);
416 installOriginTrialPartialFeature(scriptState->isolate(), scriptState->world(), instance, prototype, interface); 418 installOriginTrialPartialFeature(scriptState, instance, prototype, interface);
417 } 419 }
418 420
419 void V8TestInterfacePartial::installOriginTrialPartialFeature(ScriptState* scrip tState) { 421 void V8TestInterfacePartial::installOriginTrialPartialFeature(const ScriptState* scriptState) {
420 installOriginTrialPartialFeature(scriptState, v8::Local<v8::Object>()); 422 installOriginTrialPartialFeature(scriptState, v8::Local<v8::Object>());
421 } 423 }
422 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) { 424 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) {
423 #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> 425 #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>
424 V8TestInterface::preparePrototypeAndInterfaceObject(context, world, prototypeO bject, interfaceObject, interfaceTemplate); 426 V8TestInterface::preparePrototypeAndInterfaceObject(context, world, prototypeO bject, interfaceObject, interfaceTemplate);
425 v8::Isolate* isolate = context->GetIsolate(); 427 v8::Isolate* isolate = context->GetIsolate();
426 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate)); 428 v8::Local<v8::Name> unscopablesSymbol(v8::Symbol::GetUnscopables(isolate));
427 v8::Local<v8::Object> unscopables; 429 v8::Local<v8::Object> unscopables;
428 if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol)) ) 430 if (v8CallBoolean(prototypeObject->HasOwnProperty(context, unscopablesSymbol)) )
429 unscopables = prototypeObject->Get(context, unscopablesSymbol).ToLocalChecke d().As<v8::Object>(); 431 unscopables = prototypeObject->Get(context, unscopablesSymbol).ToLocalChecke d().As<v8::Object>();
(...skipping 10 matching lines...) Expand all
440 V8TestInterfacePartial::preparePrototypeAndInterfaceObject); 442 V8TestInterfacePartial::preparePrototypeAndInterfaceObject);
441 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(&T estInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); 443 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(&T estInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod);
442 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterf ace(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOverlo adMethod); 444 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterf ace(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOverlo adMethod);
443 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterface (&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMeth od); 445 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterface (&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMeth od);
444 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialInt erface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodPartial OverloadMethod); 446 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialInt erface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodPartial OverloadMethod);
445 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestInte rfaceImplementationPartialV8Internal::partial2VoidMethodMethod); 447 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestInte rfaceImplementationPartialV8Internal::partial2VoidMethodMethod);
446 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&Te stInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); 448 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(&Te stInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod);
447 } 449 }
448 450
449 } // namespace blink 451 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698