| Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp
|
| index 63fd54fa1ffc564165599c79c641867c10a3ca90..b4c8bd95d1d409ace235f2c18ea45585e959f98d 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp
|
| @@ -67,141 +67,130 @@ void MEASURED_CONSTANTConstantGetterCallback(v8::Local<v8::Name>, const v8::Prop
|
|
|
| } // namespace TestConstantsV8Internal
|
|
|
| -static void installV8TestConstantsTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate)
|
| -{
|
| - // Initialize the interface object's template.
|
| - V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestConstants::wrapperTypeInfo.interfaceName, v8::Local<v8::FunctionTemplate>(), V8TestConstants::internalFieldCount);
|
| - v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
|
| - ALLOW_UNUSED_LOCAL(signature);
|
| - v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTemplate();
|
| - ALLOW_UNUSED_LOCAL(instanceTemplate);
|
| - v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
|
| - ALLOW_UNUSED_LOCAL(prototypeTemplate);
|
| - // Register DOM constants, attributes and operations.
|
| - const V8DOMConfiguration::ConstantConfiguration V8TestConstantsConstants[] = {
|
| - {"CONST_VALUE_ZERO", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| - {"CONST_VALUE_ONE", 1, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| - {"CONST_VALUE_TWO", 2, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| - {"CONST_VALUE_NEGATIVE", -1, 0, V8DOMConfiguration::ConstantTypeShort},
|
| - {"CONST_VALUE_32_BITS", 0xffffffff, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| - {"CONST_VALUE_HEX", 0x01, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| - {"CONST_VALUE_HEX2", 0X20, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| - {"CONST_VALUE_HEX3", 0x1abc, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| - {"CONST_VALUE_OCT", 010, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| - {"CONST_VALUE_NEGATIVE_OCT", -010, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| - {"CONST_VALUE_NEGATIVE_HEX", -0x1A, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| - {"CONST_VALUE_NEGATIVE_HEX2", -0X1a, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| - {"CONST_VALUE_DECIMAL", 0, 0.123, V8DOMConfiguration::ConstantTypeDouble},
|
| - {"CONST_VALUE_DECIMAL2", 0, 4e9, V8DOMConfiguration::ConstantTypeDouble},
|
| - {"CONST_VALUE_DECIMAL3", 0, 3.4e5, V8DOMConfiguration::ConstantTypeDouble},
|
| - {"CONST_VALUE_DECIMAL4", 0, .123, V8DOMConfiguration::ConstantTypeDouble},
|
| - {"CONST_VALUE_DECIMAL5", 0, 5E+4, V8DOMConfiguration::ConstantTypeDouble},
|
| - {"CONST_VALUE_NEGATIVE_DECIMAL", 0, -1.3, V8DOMConfiguration::ConstantTypeDouble},
|
| - {"CONST_VALUE_NEGATIVE_DECIMAL2", 0, -4e-9, V8DOMConfiguration::ConstantTypeDouble},
|
| - {"CONST_VALUE_FLOAT", 0, 1, V8DOMConfiguration::ConstantTypeFloat},
|
| - {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort},
|
| - };
|
| - V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestConstantsConstants, WTF_ARRAY_LENGTH(V8TestConstantsConstants));
|
| - if (RuntimeEnabledFeatures::featureName1Enabled()) {
|
| - const V8DOMConfiguration::ConstantConfiguration constantFeature1EnabledConst1Configuration = {"FEATURE1_ENABLED_CONST1", 1, 0, V8DOMConfiguration::ConstantTypeShort};
|
| - V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature1EnabledConst1Configuration);
|
| - const V8DOMConfiguration::ConstantConfiguration constantFeature1EnabledConst2Configuration = {"FEATURE1_ENABLED_CONST2", 2, 0, V8DOMConfiguration::ConstantTypeShort};
|
| - V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature1EnabledConst2Configuration);
|
| - }
|
| - if (RuntimeEnabledFeatures::featureName2Enabled()) {
|
| - const V8DOMConfiguration::ConstantConfiguration constantFeature2EnabledConst1Configuration = {"FEATURE2_ENABLED_CONST1", 3, 0, V8DOMConfiguration::ConstantTypeShort};
|
| - V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature2EnabledConst1Configuration);
|
| - const V8DOMConfiguration::ConstantConfiguration constantFeature2EnabledConst2Configuration = {"FEATURE2_ENABLED_CONST2", 4, 0, V8DOMConfiguration::ConstantTypeShort};
|
| - V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature2EnabledConst2Configuration);
|
| - }
|
| - V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "DEPRECATED_CONSTANT", TestConstantsV8Internal::DEPRECATED_CONSTANTConstantGetterCallback);
|
| - V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "MEASURED_CONSTANT", TestConstantsV8Internal::MEASURED_CONSTANTConstantGetterCallback);
|
| - static_assert(0 == TestConstants::kConstValueZero, "the value of TestConstants_kConstValueZero does not match with implementation");
|
| - static_assert(1 == TestConstants::kConstValueOne, "the value of TestConstants_kConstValueOne does not match with implementation");
|
| - static_assert(2 == TestConstants::kConstValueTwo, "the value of TestConstants_kConstValueTwo does not match with implementation");
|
| - static_assert(-1 == TestConstants::kConstValueNegative, "the value of TestConstants_kConstValueNegative does not match with implementation");
|
| - static_assert(0xffffffff == TestConstants::kConstValue32Bits, "the value of TestConstants_kConstValue32Bits does not match with implementation");
|
| - static_assert(0x01 == TestConstants::kConstValueHex, "the value of TestConstants_kConstValueHex does not match with implementation");
|
| - static_assert(0X20 == TestConstants::kConstValueHex2, "the value of TestConstants_kConstValueHex2 does not match with implementation");
|
| - static_assert(0x1abc == TestConstants::kConstValueHex3, "the value of TestConstants_kConstValueHex3 does not match with implementation");
|
| - static_assert(010 == TestConstants::kConstValueOct, "the value of TestConstants_kConstValueOct does not match with implementation");
|
| - static_assert(-010 == TestConstants::kConstValueNegativeOct, "the value of TestConstants_kConstValueNegativeOct does not match with implementation");
|
| - static_assert(-0x1A == TestConstants::kConstValueNegativeHex, "the value of TestConstants_kConstValueNegativeHex does not match with implementation");
|
| - static_assert(-0X1a == TestConstants::kConstValueNegativeHex2, "the value of TestConstants_kConstValueNegativeHex2 does not match with implementation");
|
| - static_assert(1 == TestConstants::kDeprecatedConstant, "the value of TestConstants_kDeprecatedConstant does not match with implementation");
|
| - static_assert(1 == TestConstants::kMeasuredConstant, "the value of TestConstants_kMeasuredConstant does not match with implementation");
|
| - static_assert(1 == TestConstants::kFeature1EnabledConst1, "the value of TestConstants_kFeature1EnabledConst1 does not match with implementation");
|
| - static_assert(2 == TestConstants::kFeature1EnabledConst2, "the value of TestConstants_kFeature1EnabledConst2 does not match with implementation");
|
| - static_assert(3 == TestConstants::kFeature2EnabledConst1, "the value of TestConstants_kFeature2EnabledConst1 does not match with implementation");
|
| - static_assert(4 == TestConstants::kFeature2EnabledConst2, "the value of TestConstants_kFeature2EnabledConst2 does not match with implementation");
|
| - static_assert(6 == TestConstants::kFeature1OriginTrialEnabledConst1, "the value of TestConstants_kFeature1OriginTrialEnabledConst1 does not match with implementation");
|
| - static_assert(7 == TestConstants::kFeature1OriginTrialEnabledConst2, "the value of TestConstants_kFeature1OriginTrialEnabledConst2 does not match with implementation");
|
| - static_assert(8 == TestConstants::kFeature2OriginTrialEnabledConst1, "the value of TestConstants_kFeature2OriginTrialEnabledConst1 does not match with implementation");
|
| - static_assert(9 == TestConstants::kFeature2OriginTrialEnabledConst2, "the value of TestConstants_kFeature2OriginTrialEnabledConst2 does not match with implementation");
|
| - static_assert(1 == TestConstants::CONST_IMPL, "the value of TestConstants_CONST_IMPL does not match with implementation");
|
| +static void installV8TestConstantsTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
|
| + // Initialize the interface object's template.
|
| + V8DOMConfiguration::initializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestConstants::wrapperTypeInfo.interfaceName, v8::Local<v8::FunctionTemplate>(), V8TestConstants::internalFieldCount);
|
| + v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
|
| + ALLOW_UNUSED_LOCAL(signature);
|
| + v8::Local<v8::ObjectTemplate> instanceTemplate = interfaceTemplate->InstanceTemplate();
|
| + ALLOW_UNUSED_LOCAL(instanceTemplate);
|
| + v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
|
| + ALLOW_UNUSED_LOCAL(prototypeTemplate);
|
| + // Register DOM constants, attributes and operations.
|
| + const V8DOMConfiguration::ConstantConfiguration V8TestConstantsConstants[] = {
|
| + {"CONST_VALUE_ZERO", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| + {"CONST_VALUE_ONE", 1, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| + {"CONST_VALUE_TWO", 2, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| + {"CONST_VALUE_NEGATIVE", -1, 0, V8DOMConfiguration::ConstantTypeShort},
|
| + {"CONST_VALUE_32_BITS", 0xffffffff, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| + {"CONST_VALUE_HEX", 0x01, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| + {"CONST_VALUE_HEX2", 0X20, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| + {"CONST_VALUE_HEX3", 0x1abc, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| + {"CONST_VALUE_OCT", 010, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| + {"CONST_VALUE_NEGATIVE_OCT", -010, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| + {"CONST_VALUE_NEGATIVE_HEX", -0x1A, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| + {"CONST_VALUE_NEGATIVE_HEX2", -0X1a, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| + {"CONST_VALUE_DECIMAL", 0, 0.123, V8DOMConfiguration::ConstantTypeDouble},
|
| + {"CONST_VALUE_DECIMAL2", 0, 4e9, V8DOMConfiguration::ConstantTypeDouble},
|
| + {"CONST_VALUE_DECIMAL3", 0, 3.4e5, V8DOMConfiguration::ConstantTypeDouble},
|
| + {"CONST_VALUE_DECIMAL4", 0, .123, V8DOMConfiguration::ConstantTypeDouble},
|
| + {"CONST_VALUE_DECIMAL5", 0, 5E+4, V8DOMConfiguration::ConstantTypeDouble},
|
| + {"CONST_VALUE_NEGATIVE_DECIMAL", 0, -1.3, V8DOMConfiguration::ConstantTypeDouble},
|
| + {"CONST_VALUE_NEGATIVE_DECIMAL2", 0, -4e-9, V8DOMConfiguration::ConstantTypeDouble},
|
| + {"CONST_VALUE_FLOAT", 0, 1, V8DOMConfiguration::ConstantTypeFloat},
|
| + {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort},
|
| + };
|
| + V8DOMConfiguration::installConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestConstantsConstants, WTF_ARRAY_LENGTH(V8TestConstantsConstants));
|
| + if (RuntimeEnabledFeatures::featureName1Enabled()) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature1EnabledConst1Configuration = {"FEATURE1_ENABLED_CONST1", 1, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature1EnabledConst1Configuration);
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature1EnabledConst2Configuration = {"FEATURE1_ENABLED_CONST2", 2, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature1EnabledConst2Configuration);
|
| + }
|
| + if (RuntimeEnabledFeatures::featureName2Enabled()) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature2EnabledConst1Configuration = {"FEATURE2_ENABLED_CONST1", 3, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature2EnabledConst1Configuration);
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature2EnabledConst2Configuration = {"FEATURE2_ENABLED_CONST2", 4, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature2EnabledConst2Configuration);
|
| + }
|
| + V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "DEPRECATED_CONSTANT", TestConstantsV8Internal::DEPRECATED_CONSTANTConstantGetterCallback);
|
| + V8DOMConfiguration::installConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "MEASURED_CONSTANT", TestConstantsV8Internal::MEASURED_CONSTANTConstantGetterCallback);
|
| + static_assert(0 == TestConstants::kConstValueZero, "the value of TestConstants_kConstValueZero does not match with implementation");
|
| + static_assert(1 == TestConstants::kConstValueOne, "the value of TestConstants_kConstValueOne does not match with implementation");
|
| + static_assert(2 == TestConstants::kConstValueTwo, "the value of TestConstants_kConstValueTwo does not match with implementation");
|
| + static_assert(-1 == TestConstants::kConstValueNegative, "the value of TestConstants_kConstValueNegative does not match with implementation");
|
| + static_assert(0xffffffff == TestConstants::kConstValue32Bits, "the value of TestConstants_kConstValue32Bits does not match with implementation");
|
| + static_assert(0x01 == TestConstants::kConstValueHex, "the value of TestConstants_kConstValueHex does not match with implementation");
|
| + static_assert(0X20 == TestConstants::kConstValueHex2, "the value of TestConstants_kConstValueHex2 does not match with implementation");
|
| + static_assert(0x1abc == TestConstants::kConstValueHex3, "the value of TestConstants_kConstValueHex3 does not match with implementation");
|
| + static_assert(010 == TestConstants::kConstValueOct, "the value of TestConstants_kConstValueOct does not match with implementation");
|
| + static_assert(-010 == TestConstants::kConstValueNegativeOct, "the value of TestConstants_kConstValueNegativeOct does not match with implementation");
|
| + static_assert(-0x1A == TestConstants::kConstValueNegativeHex, "the value of TestConstants_kConstValueNegativeHex does not match with implementation");
|
| + static_assert(-0X1a == TestConstants::kConstValueNegativeHex2, "the value of TestConstants_kConstValueNegativeHex2 does not match with implementation");
|
| + static_assert(1 == TestConstants::kDeprecatedConstant, "the value of TestConstants_kDeprecatedConstant does not match with implementation");
|
| + static_assert(1 == TestConstants::kMeasuredConstant, "the value of TestConstants_kMeasuredConstant does not match with implementation");
|
| + static_assert(1 == TestConstants::kFeature1EnabledConst1, "the value of TestConstants_kFeature1EnabledConst1 does not match with implementation");
|
| + static_assert(2 == TestConstants::kFeature1EnabledConst2, "the value of TestConstants_kFeature1EnabledConst2 does not match with implementation");
|
| + static_assert(3 == TestConstants::kFeature2EnabledConst1, "the value of TestConstants_kFeature2EnabledConst1 does not match with implementation");
|
| + static_assert(4 == TestConstants::kFeature2EnabledConst2, "the value of TestConstants_kFeature2EnabledConst2 does not match with implementation");
|
| + static_assert(6 == TestConstants::kFeature1OriginTrialEnabledConst1, "the value of TestConstants_kFeature1OriginTrialEnabledConst1 does not match with implementation");
|
| + static_assert(7 == TestConstants::kFeature1OriginTrialEnabledConst2, "the value of TestConstants_kFeature1OriginTrialEnabledConst2 does not match with implementation");
|
| + static_assert(8 == TestConstants::kFeature2OriginTrialEnabledConst1, "the value of TestConstants_kFeature2OriginTrialEnabledConst1 does not match with implementation");
|
| + static_assert(9 == TestConstants::kFeature2OriginTrialEnabledConst2, "the value of TestConstants_kFeature2OriginTrialEnabledConst2 does not match with implementation");
|
| + static_assert(1 == TestConstants::CONST_IMPL, "the value of TestConstants_CONST_IMPL does not match with implementation");
|
| }
|
|
|
| -void V8TestConstants::installFeatureName1(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface)
|
| -{
|
| - const V8DOMConfiguration::ConstantConfiguration constantFeature1OriginTrialEnabledConst1Configuration = {"FEATURE1_ORIGIN_TRIAL_ENABLED_CONST1", 6, 0, V8DOMConfiguration::ConstantTypeShort};
|
| - V8DOMConfiguration::installConstant(isolate, interface, prototype, constantFeature1OriginTrialEnabledConst1Configuration);
|
| - const V8DOMConfiguration::ConstantConfiguration constantFeature1OriginTrialEnabledConst2Configuration = {"FEATURE1_ORIGIN_TRIAL_ENABLED_CONST2", 7, 0, V8DOMConfiguration::ConstantTypeShort};
|
| - V8DOMConfiguration::installConstant(isolate, interface, prototype, constantFeature1OriginTrialEnabledConst2Configuration);
|
| +void V8TestConstants::installFeatureName1(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature1OriginTrialEnabledConst1Configuration = {"FEATURE1_ORIGIN_TRIAL_ENABLED_CONST1", 6, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, interface, prototype, constantFeature1OriginTrialEnabledConst1Configuration);
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature1OriginTrialEnabledConst2Configuration = {"FEATURE1_ORIGIN_TRIAL_ENABLED_CONST2", 7, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, interface, prototype, constantFeature1OriginTrialEnabledConst2Configuration);
|
| }
|
|
|
| -void V8TestConstants::installFeatureName1(ScriptState* scriptState, v8::Local<v8::Object> instance)
|
| -{
|
| - V8PerContextData* perContextData = V8PerContextData::from(scriptState->context());
|
| - v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestConstants::wrapperTypeInfo);
|
| - v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestConstants::wrapperTypeInfo);
|
| - ALLOW_UNUSED_LOCAL(interface);
|
| - installFeatureName1(scriptState->isolate(), scriptState->world(), instance, prototype, interface);
|
| +void V8TestConstants::installFeatureName1(ScriptState* scriptState, v8::Local<v8::Object> instance) {
|
| + V8PerContextData* perContextData = V8PerContextData::from(scriptState->context());
|
| + v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestConstants::wrapperTypeInfo);
|
| + v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestConstants::wrapperTypeInfo);
|
| + ALLOW_UNUSED_LOCAL(interface);
|
| + installFeatureName1(scriptState->isolate(), scriptState->world(), instance, prototype, interface);
|
| }
|
|
|
| -void V8TestConstants::installFeatureName1(ScriptState* scriptState)
|
| -{
|
| - installFeatureName1(scriptState, v8::Local<v8::Object>());
|
| +void V8TestConstants::installFeatureName1(ScriptState* scriptState) {
|
| + installFeatureName1(scriptState, v8::Local<v8::Object>());
|
| }
|
|
|
| -void V8TestConstants::installFeatureName2(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface)
|
| -{
|
| - const V8DOMConfiguration::ConstantConfiguration constantFeature2OriginTrialEnabledConst1Configuration = {"FEATURE2_ORIGIN_TRIAL_ENABLED_CONST1", 8, 0, V8DOMConfiguration::ConstantTypeShort};
|
| - V8DOMConfiguration::installConstant(isolate, interface, prototype, constantFeature2OriginTrialEnabledConst1Configuration);
|
| - const V8DOMConfiguration::ConstantConfiguration constantFeature2OriginTrialEnabledConst2Configuration = {"FEATURE2_ORIGIN_TRIAL_ENABLED_CONST2", 9, 0, V8DOMConfiguration::ConstantTypeShort};
|
| - V8DOMConfiguration::installConstant(isolate, interface, prototype, constantFeature2OriginTrialEnabledConst2Configuration);
|
| +void V8TestConstants::installFeatureName2(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature2OriginTrialEnabledConst1Configuration = {"FEATURE2_ORIGIN_TRIAL_ENABLED_CONST1", 8, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, interface, prototype, constantFeature2OriginTrialEnabledConst1Configuration);
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature2OriginTrialEnabledConst2Configuration = {"FEATURE2_ORIGIN_TRIAL_ENABLED_CONST2", 9, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, interface, prototype, constantFeature2OriginTrialEnabledConst2Configuration);
|
| }
|
|
|
| -void V8TestConstants::installFeatureName2(ScriptState* scriptState, v8::Local<v8::Object> instance)
|
| -{
|
| - V8PerContextData* perContextData = V8PerContextData::from(scriptState->context());
|
| - v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestConstants::wrapperTypeInfo);
|
| - v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestConstants::wrapperTypeInfo);
|
| - ALLOW_UNUSED_LOCAL(interface);
|
| - installFeatureName2(scriptState->isolate(), scriptState->world(), instance, prototype, interface);
|
| +void V8TestConstants::installFeatureName2(ScriptState* scriptState, v8::Local<v8::Object> instance) {
|
| + V8PerContextData* perContextData = V8PerContextData::from(scriptState->context());
|
| + v8::Local<v8::Object> prototype = perContextData->prototypeForType(&V8TestConstants::wrapperTypeInfo);
|
| + v8::Local<v8::Function> interface = perContextData->constructorForType(&V8TestConstants::wrapperTypeInfo);
|
| + ALLOW_UNUSED_LOCAL(interface);
|
| + installFeatureName2(scriptState->isolate(), scriptState->world(), instance, prototype, interface);
|
| }
|
|
|
| -void V8TestConstants::installFeatureName2(ScriptState* scriptState)
|
| -{
|
| - installFeatureName2(scriptState, v8::Local<v8::Object>());
|
| +void V8TestConstants::installFeatureName2(ScriptState* scriptState) {
|
| + installFeatureName2(scriptState, v8::Local<v8::Object>());
|
| }
|
| -v8::Local<v8::FunctionTemplate> V8TestConstants::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world)
|
| -{
|
| - return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestConstantsTemplate);
|
| +v8::Local<v8::FunctionTemplate> V8TestConstants::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
|
| + return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestConstantsTemplate);
|
| }
|
|
|
| -bool V8TestConstants::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
|
| -{
|
| - return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
|
| +bool V8TestConstants::hasInstance(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
|
| + return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Value);
|
| }
|
|
|
| -v8::Local<v8::Object> V8TestConstants::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate)
|
| -{
|
| - return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
|
| +v8::Local<v8::Object> V8TestConstants::findInstanceInPrototypeChain(v8::Local<v8::Value> v8Value, v8::Isolate* isolate) {
|
| + return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrapperTypeInfo, v8Value);
|
| }
|
|
|
| -TestConstants* V8TestConstants::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value)
|
| -{
|
| - return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
|
| +TestConstants* V8TestConstants::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Value> value) {
|
| + return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
|
| }
|
|
|
| -} // namespace blink
|
| +} // namespace blink
|
|
|