| Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
|
| index 365c5dad592b1d5c4f6bf5d3a5c6ac7575c8cce2..4b64c488de8c9b654fd4160fe245fef3c033be29 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
|
| @@ -114,71 +114,26 @@ static void MEASURED_CONSTANTConstantGetterCallback(v8::Local<v8::Name>, const v
|
|
|
| static void FEATURE1_ORIGIN_TRIAL_ENABLED_CONST1ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| - ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| - String errorMessage;
|
| - if (!OriginTrials::featureName1Enabled(executionContext, errorMessage)) {
|
| - v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!errorMessage.isEmpty()) {
|
| - executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| - }
|
| - return;
|
| - }
|
| v8SetReturnValueInt(info, 1);
|
| }
|
|
|
| static void FEATURE1_ORIGIN_TRIAL_ENABLED_CONST2ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| - ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| - String errorMessage;
|
| - if (!OriginTrials::featureName1Enabled(executionContext, errorMessage)) {
|
| - v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!errorMessage.isEmpty()) {
|
| - executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| - }
|
| - return;
|
| - }
|
| v8SetReturnValueInt(info, 2);
|
| }
|
|
|
| static void FEATURE2_ORIGIN_TRIAL_ENABLED_CONST1ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| - ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| - String errorMessage;
|
| - if (!OriginTrials::featureName2Enabled(executionContext, errorMessage)) {
|
| - v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!errorMessage.isEmpty()) {
|
| - executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| - }
|
| - return;
|
| - }
|
| v8SetReturnValueInt(info, 3);
|
| }
|
|
|
| static void FEATURE2_ORIGIN_TRIAL_ENABLED_CONST2ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| - ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| - String errorMessage;
|
| - if (!OriginTrials::featureName2Enabled(executionContext, errorMessage)) {
|
| - v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!errorMessage.isEmpty()) {
|
| - executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| - }
|
| - return;
|
| - }
|
| v8SetReturnValueInt(info, 4);
|
| }
|
|
|
| static void FEATURE3_ORIGIN_TRIAL_ENABLED_CONST1ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| - ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| - String errorMessage;
|
| - if (!OriginTrials::featureName3Enabled(executionContext, errorMessage)) {
|
| - v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!errorMessage.isEmpty()) {
|
| - executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| - }
|
| - return;
|
| - }
|
| v8SetReturnValueInt(info, 5);
|
| }
|
|
|
| @@ -2699,15 +2654,6 @@ static void notEnumerableLongAttributeAttributeSetterCallback(const v8::Function
|
|
|
| static void originTrialEnabledLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| - ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| - String errorMessage;
|
| - if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) {
|
| - v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!errorMessage.isEmpty()) {
|
| - executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| - }
|
| - return;
|
| - }
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| v8SetReturnValueInt(info, impl->originTrialEnabledLongAttribute());
|
| @@ -2715,15 +2661,6 @@ static void originTrialEnabledLongAttributeAttributeGetter(const v8::FunctionCal
|
|
|
| static void originTrialEnabledLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| - ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| - String errorMessage;
|
| - if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) {
|
| - v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!errorMessage.isEmpty()) {
|
| - executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| - }
|
| - return;
|
| - }
|
| TestObjectV8Internal::originTrialEnabledLongAttributeAttributeGetter(info);
|
| }
|
|
|
| @@ -4580,15 +4517,6 @@ static void unscopeableLongAttributeAttributeSetterCallback(const v8::FunctionCa
|
|
|
| static void unscopeableOriginTrialEnabledLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| - ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| - String errorMessage;
|
| - if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) {
|
| - v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!errorMessage.isEmpty()) {
|
| - executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| - }
|
| - return;
|
| - }
|
| v8::Local<v8::Object> holder = info.Holder();
|
| TestObject* impl = V8TestObject::toImpl(holder);
|
| v8SetReturnValueInt(info, impl->unscopeableOriginTrialEnabledLongAttribute());
|
| @@ -4596,15 +4524,6 @@ static void unscopeableOriginTrialEnabledLongAttributeAttributeGetter(const v8::
|
|
|
| static void unscopeableOriginTrialEnabledLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| - ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| - String errorMessage;
|
| - if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) {
|
| - v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!errorMessage.isEmpty()) {
|
| - executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| - }
|
| - return;
|
| - }
|
| TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeGetter(info);
|
| }
|
|
|
| @@ -9852,15 +9771,6 @@ static void originTrialEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8
|
|
|
| static void originTrialEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| - ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| - String errorMessage;
|
| - if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) {
|
| - v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!errorMessage.isEmpty()) {
|
| - executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| - }
|
| - return;
|
| - }
|
| TestObjectV8Internal::originTrialEnabledVoidMethodMethod(info);
|
| }
|
|
|
| @@ -9872,15 +9782,6 @@ static void perWorldBindingsOriginTrialEnabledVoidMethodMethod(const v8::Functio
|
|
|
| static void perWorldBindingsOriginTrialEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| - ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| - String errorMessage;
|
| - if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) {
|
| - v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!errorMessage.isEmpty()) {
|
| - executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| - }
|
| - return;
|
| - }
|
| TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethod(info);
|
| }
|
|
|
| @@ -9892,15 +9793,6 @@ static void perWorldBindingsOriginTrialEnabledVoidMethodMethodForMainWorld(const
|
|
|
| static void perWorldBindingsOriginTrialEnabledVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| - ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate());
|
| - String errorMessage;
|
| - if (!OriginTrials::featureNameEnabled(executionContext, errorMessage)) {
|
| - v8SetReturnValue(info, v8::Undefined(info.GetIsolate()));
|
| - if (!errorMessage.isEmpty()) {
|
| - executionContext->addConsoleMessage(ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, errorMessage));
|
| - }
|
| - return;
|
| - }
|
| TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethodForMainWorld(info);
|
| }
|
|
|
| @@ -11584,7 +11476,6 @@ const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] = {
|
| {"customSetterImplementedAsLongAttribute", TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| {"measureAsLongAttribute", TestObjectV8Internal::measureAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::measureAsLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| {"notEnumerableLongAttribute", TestObjectV8Internal::notEnumerableLongAttributeAttributeGetterCallback, TestObjectV8Internal::notEnumerableLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| - {"originTrialEnabledLongAttribute", TestObjectV8Internal::originTrialEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::originTrialEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| {"activityLoggingAccessPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| {"activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| @@ -11636,7 +11527,6 @@ const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] = {
|
| {"measuredLongAttribute", TestObjectV8Internal::measuredLongAttributeAttributeGetterCallback, TestObjectV8Internal::measuredLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| {"sameObjectAttribute", TestObjectV8Internal::sameObjectAttributeAttributeGetterCallback, TestObjectV8Internal::sameObjectAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| {"unscopeableLongAttribute", TestObjectV8Internal::unscopeableLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopeableLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| - {"unscopeableOriginTrialEnabledLongAttribute", TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| {"testInterfaceAttribute", TestObjectV8Internal::testInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| {"testInterfaceGarbageCollectedAttribute", TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| {"testInterfaceGarbageCollectedOrNullAttribute", TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder},
|
| @@ -12026,6 +11916,18 @@ static void installV8TestObjectTemplate(v8::Isolate* isolate, const DOMWrapperWo
|
| V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partiallyRuntimeEnabledOverloadedVoidMethodMethodConfiguration);
|
| }
|
|
|
| +
|
| +void V8TestObject::installFeatureName(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Function> interface)
|
| +{
|
| + v8::Local<v8::Signature> signature;
|
| + v8::Local<v8::Object> prototype = instance->GetPrototype()->ToObject(isolate);
|
| + const V8DOMConfiguration::AccessorConfiguration accessororiginTrialEnabledLongAttributeConfiguration = \
|
| + {"originTrialEnabledLongAttribute", TestObjectV8Internal::originTrialEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::originTrialEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| + V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, interface, signature, accessororiginTrialEnabledLongAttributeConfiguration);
|
| + const V8DOMConfiguration::AccessorConfiguration accessorunscopeableOriginTrialEnabledLongAttributeConfiguration = \
|
| + {"unscopeableOriginTrialEnabledLongAttribute", TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopeableOriginTrialEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| + V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, interface, signature, accessorunscopeableOriginTrialEnabledLongAttributeConfiguration);
|
| +}
|
| v8::Local<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world)
|
| {
|
| return V8DOMConfiguration::domClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestObjectTemplate);
|
|
|