| 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 cb237ecf18b6a75cd368d00f8af3f8496a81c6ff..6266e8a066cfaa801fe6c5f4f576161e2b6784bf 100644
|
| --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
|
| +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
|
| @@ -61,6 +61,7 @@
|
| #include "core/dom/MessagePort.h"
|
| #include "core/dom/TagCollection.h"
|
| #include "core/dom/custom/CustomElementProcessingStack.h"
|
| +#include "core/experiments/Experiments.h"
|
| #include "core/frame/ImageBitmap.h"
|
| #include "core/frame/LocalFrame.h"
|
| #include "core/frame/UseCounter.h"
|
| @@ -2854,6 +2855,80 @@ static void enforceRangeLongAttributeAttributeSetterCallback(const v8::FunctionC
|
| TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| }
|
|
|
| +static void experimentRuntimeEnabledLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + TestObject* impl = V8TestObject::toImpl(holder);
|
| + v8SetReturnValueInt(info, impl->experimentRuntimeEnabledLongAttribute());
|
| +}
|
| +
|
| +static void experimentRuntimeEnabledLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
|
| + TestObjectV8Internal::experimentRuntimeEnabledLongAttributeAttributeGetter(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| +static void experimentRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + ExceptionState exceptionState(ExceptionState::SetterContext, "experimentRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate());
|
| + TestObject* impl = V8TestObject::toImpl(holder);
|
| + int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
|
| + if (exceptionState.throwIfNeeded())
|
| + return;
|
| + impl->setExperimentRuntimeEnabledLongAttribute(cppValue);
|
| +}
|
| +
|
| +static void experimentRuntimeEnabledLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Local<v8::Value> v8Value = info[0];
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
|
| + TestObjectV8Internal::experimentRuntimeEnabledLongAttributeAttributeSetter(v8Value, info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| +#if ENABLE(CONDITION)
|
| +static void experimentConditionalRuntimeEnabledLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + TestObject* impl = V8TestObject::toImpl(holder);
|
| + v8SetReturnValueInt(info, impl->experimentConditionalRuntimeEnabledLongAttribute());
|
| +}
|
| +#endif // ENABLE(CONDITION)
|
| +
|
| +#if ENABLE(CONDITION)
|
| +static void experimentConditionalRuntimeEnabledLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
|
| + TestObjectV8Internal::experimentConditionalRuntimeEnabledLongAttributeAttributeGetter(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +#endif // ENABLE(CONDITION)
|
| +
|
| +#if ENABLE(CONDITION)
|
| +static void experimentConditionalRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + ExceptionState exceptionState(ExceptionState::SetterContext, "experimentConditionalRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate());
|
| + TestObject* impl = V8TestObject::toImpl(holder);
|
| + int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
|
| + if (exceptionState.throwIfNeeded())
|
| + return;
|
| + impl->setExperimentConditionalRuntimeEnabledLongAttribute(cppValue);
|
| +}
|
| +#endif // ENABLE(CONDITION)
|
| +
|
| +#if ENABLE(CONDITION)
|
| +static void experimentConditionalRuntimeEnabledLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Local<v8::Value> v8Value = info[0];
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
|
| + TestObjectV8Internal::experimentConditionalRuntimeEnabledLongAttributeAttributeSetter(v8Value, info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +#endif // ENABLE(CONDITION)
|
| +
|
| static void implementedAsLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| v8::Local<v8::Object> holder = info.Holder();
|
| @@ -5403,6 +5478,39 @@ static void unscopeableLongAttributeAttributeSetterCallback(const v8::FunctionCa
|
| TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| }
|
|
|
| +static void unscopeableExperimentEnabledLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + TestObject* impl = V8TestObject::toImpl(holder);
|
| + v8SetReturnValueInt(info, impl->unscopeableExperimentEnabledLongAttribute());
|
| +}
|
| +
|
| +static void unscopeableExperimentEnabledLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
|
| + TestObjectV8Internal::unscopeableExperimentEnabledLongAttributeAttributeGetter(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| +static void unscopeableExperimentEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableExperimentEnabledLongAttribute", "TestObject", holder, info.GetIsolate());
|
| + TestObject* impl = V8TestObject::toImpl(holder);
|
| + int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
|
| + if (exceptionState.throwIfNeeded())
|
| + return;
|
| + impl->setUnscopeableExperimentEnabledLongAttribute(cppValue);
|
| +}
|
| +
|
| +static void unscopeableExperimentEnabledLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Local<v8::Value> v8Value = info[0];
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
|
| + TestObjectV8Internal::unscopeableExperimentEnabledLongAttributeAttributeSetter(v8Value, info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| static void unscopeableRuntimeEnabledLongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| v8::Local<v8::Object> holder = info.Holder();
|
| @@ -10709,6 +10817,227 @@ static void doNotCheckSignatureVoidMethodMethodCallback(const v8::FunctionCallba
|
| TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| }
|
|
|
| +static void experimentEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + impl->experimentEnabledVoidMethod();
|
| +}
|
| +
|
| +static void experimentEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
|
| + TestObjectV8Internal::experimentEnabledVoidMethodMethod(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| +static void perWorldBindingsExperimentEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + impl->perWorldBindingsExperimentEnabledVoidMethod();
|
| +}
|
| +
|
| +static void perWorldBindingsExperimentEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
|
| + TestObjectV8Internal::perWorldBindingsExperimentEnabledVoidMethodMethod(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| +static void perWorldBindingsExperimentEnabledVoidMethodMethodForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + impl->perWorldBindingsExperimentEnabledVoidMethod();
|
| +}
|
| +
|
| +static void perWorldBindingsExperimentEnabledVoidMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
|
| + TestObjectV8Internal::perWorldBindingsExperimentEnabledVoidMethodMethodForMainWorld(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| +static void experimentEnabledOverloadedVoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + V8StringResource<> stringArg;
|
| + {
|
| + stringArg = info[0];
|
| + if (!stringArg.prepare())
|
| + return;
|
| + }
|
| + impl->experimentEnabledOverloadedVoidMethod(stringArg);
|
| +}
|
| +
|
| +static void experimentEnabledOverloadedVoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + ExceptionState exceptionState(ExceptionState::ExecutionContext, "experimentEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + int longArg;
|
| + {
|
| + longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
|
| + if (exceptionState.throwIfNeeded())
|
| + return;
|
| + }
|
| + impl->experimentEnabledOverloadedVoidMethod(longArg);
|
| +}
|
| +
|
| +static void experimentEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + ExceptionState exceptionState(ExceptionState::ExecutionContext, "experimentEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
|
| + switch (std::min(1, info.Length())) {
|
| + case 1:
|
| + if (info[0]->IsNumber()) {
|
| + experimentEnabledOverloadedVoidMethod2Method(info);
|
| + return;
|
| + }
|
| + if (true) {
|
| + experimentEnabledOverloadedVoidMethod1Method(info);
|
| + return;
|
| + }
|
| + if (true) {
|
| + experimentEnabledOverloadedVoidMethod2Method(info);
|
| + return;
|
| + }
|
| + break;
|
| + default:
|
| + break;
|
| + }
|
| + if (info.Length() < 1) {
|
| + exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
|
| + exceptionState.throwIfNeeded();
|
| + return;
|
| + }
|
| + exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| + exceptionState.throwIfNeeded();
|
| + return;
|
| +}
|
| +
|
| +static void experimentEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
|
| + TestObjectV8Internal::experimentEnabledOverloadedVoidMethodMethod(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| +static void partiallyExperimentEnabledOverloadedVoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + V8StringResource<> stringArg;
|
| + {
|
| + stringArg = info[0];
|
| + if (!stringArg.prepare())
|
| + return;
|
| + }
|
| + impl->partiallyExperimentEnabledOverloadedVoidMethod(stringArg);
|
| +}
|
| +
|
| +static void partiallyExperimentEnabledOverloadedVoidMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + TestInterfaceImplementation* testInterfaceArg;
|
| + {
|
| + testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), info[0]);
|
| + if (!testInterfaceArg) {
|
| + V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("partiallyExperimentEnabledOverloadedVoidMethod", "TestObject", "parameter 1 is not of type 'TestInterface'."));
|
| + return;
|
| + }
|
| + }
|
| + impl->partiallyExperimentEnabledOverloadedVoidMethod(testInterfaceArg);
|
| +}
|
| +
|
| +static void partiallyExperimentEnabledOverloadedVoidMethod3Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyExperimentEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + int longArg;
|
| + V8StringResource<> stringArg;
|
| + {
|
| + longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
|
| + if (exceptionState.throwIfNeeded())
|
| + return;
|
| + stringArg = info[1];
|
| + if (!stringArg.prepare())
|
| + return;
|
| + }
|
| + impl->partiallyExperimentEnabledOverloadedVoidMethod(longArg, stringArg);
|
| +}
|
| +
|
| +static void partiallyExperimentEnabledOverloadedVoidMethod4Method(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyExperimentEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + int longArg;
|
| + V8StringResource<> stringArg;
|
| + TestInterfaceImplementation* testInterfaceArg;
|
| + {
|
| + longArg = toInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
|
| + if (exceptionState.throwIfNeeded())
|
| + return;
|
| + stringArg = info[1];
|
| + if (!stringArg.prepare())
|
| + return;
|
| + testInterfaceArg = V8TestInterface::toImplWithTypeCheck(info.GetIsolate(), info[2]);
|
| + if (!testInterfaceArg) {
|
| + exceptionState.throwTypeError("parameter 3 is not of type 'TestInterface'.");
|
| + exceptionState.throwIfNeeded();
|
| + return;
|
| + }
|
| + }
|
| + impl->partiallyExperimentEnabledOverloadedVoidMethod(longArg, stringArg, testInterfaceArg);
|
| +}
|
| +
|
| +static void partiallyExperimentEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyExperimentEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
|
| + switch (std::min(3, info.Length())) {
|
| + case 1:
|
| + if (Experiments::isApiEnabledWithoutMessage(currentExecutionContext(isolate), "FeatureName2")) {
|
| + if (V8TestInterface::hasInstance(info[0], info.GetIsolate())) {
|
| + partiallyExperimentEnabledOverloadedVoidMethod2Method(info);
|
| + return;
|
| + }
|
| + }
|
| + if (Experiments::isApiEnabledWithoutMessage(currentExecutionContext(isolate), "FeatureName1")) {
|
| + if (true) {
|
| + partiallyExperimentEnabledOverloadedVoidMethod1Method(info);
|
| + return;
|
| + }
|
| + }
|
| + break;
|
| + case 2:
|
| + if (true) {
|
| + partiallyExperimentEnabledOverloadedVoidMethod3Method(info);
|
| + return;
|
| + }
|
| + break;
|
| + case 3:
|
| + if (Experiments::isApiEnabledWithoutMessage(currentExecutionContext(isolate), "FeatureName3")) {
|
| + if (true) {
|
| + partiallyExperimentEnabledOverloadedVoidMethod4Method(info);
|
| + return;
|
| + }
|
| + }
|
| + break;
|
| + default:
|
| + break;
|
| + }
|
| + if (info.Length() < 1) {
|
| + exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
|
| + exceptionState.throwIfNeeded();
|
| + return;
|
| + }
|
| + exceptionState.throwTypeError("No function was found that matched the signature provided.");
|
| + exceptionState.throwIfNeeded();
|
| + return;
|
| +}
|
| +
|
| +static void partiallyExperimentEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
|
| + TestObjectV8Internal::partiallyExperimentEnabledOverloadedVoidMethodMethod(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| static void implementedAsVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| @@ -12989,6 +13318,7 @@ 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},
|
| + {"unscopeableExperimentEnabledLongAttribute", TestObjectV8Internal::unscopeableExperimentEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopeableExperimentEnabledLongAttributeAttributeSetterCallback, 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},
|
| @@ -13198,6 +13528,7 @@ const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = {
|
| #endif // ENABLE(CONDITION)
|
| {"customElementCallbacksVoidMethod", TestObjectV8Internal::customElementCallbacksVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
|
| {"deprecatedVoidMethod", TestObjectV8Internal::deprecatedVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
|
| + {"partiallyExperimentEnabledOverloadedVoidMethod", TestObjectV8Internal::partiallyExperimentEnabledOverloadedVoidMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
|
| {"implementedAsVoidMethod", TestObjectV8Internal::implementedAsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
|
| {"measureAsVoidMethod", TestObjectV8Internal::measureAsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
|
| {"measureMethod", TestObjectV8Internal::measureMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype},
|
| @@ -13288,6 +13619,18 @@ static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function
|
| {"conditionalRuntimeEnabledLongAttribute", TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::conditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototypeTemplate, functionTemplate, defaultSignature, accessorconditionalRuntimeEnabledLongAttributeConfiguration);
|
| #endif // ENABLE(CONDITION)
|
| + if (RuntimeEnabledFeatures::experimentalFrameworkEnabled()) {
|
| + const V8DOMConfiguration::AccessorConfiguration accessorexperimentRuntimeEnabledLongAttributeConfiguration = \
|
| + {"experimentRuntimeEnabledLongAttribute", TestObjectV8Internal::experimentRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::experimentRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| + V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototypeTemplate, functionTemplate, defaultSignature, accessorexperimentRuntimeEnabledLongAttributeConfiguration);
|
| + }
|
| +#if ENABLE(CONDITION)
|
| + if (RuntimeEnabledFeatures::experimentalFrameworkEnabled()) {
|
| + const V8DOMConfiguration::AccessorConfiguration accessorexperimentConditionalRuntimeEnabledLongAttributeConfiguration = \
|
| + {"experimentConditionalRuntimeEnabledLongAttribute", TestObjectV8Internal::experimentConditionalRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::experimentConditionalRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder};
|
| + V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototypeTemplate, functionTemplate, defaultSignature, accessorexperimentConditionalRuntimeEnabledLongAttributeConfiguration);
|
| + }
|
| +#endif // ENABLE(CONDITION)
|
| }
|
| const V8DOMConfiguration::ConstantConfiguration V8TestObjectConstants[] = {
|
| {"CONST_VALUE_0", 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| @@ -13315,24 +13658,66 @@ static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function
|
| {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::ConstantTypeShort},
|
| };
|
| V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTemplate, V8TestObjectConstants, WTF_ARRAY_LENGTH(V8TestObjectConstants));
|
| + ExecutionContext* ec = currentExecutionContext(isolate);
|
| + ALLOW_UNUSED_LOCAL(ec);
|
| if (RuntimeEnabledFeatures::featureName1Enabled()) {
|
| const V8DOMConfiguration::ConstantConfiguration constantFeature1EnabledConst1Configuration = {"FEATURE1_ENABLED_CONST1", 1, 0, V8DOMConfiguration::ConstantTypeShort};
|
| V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFeature1EnabledConst1Configuration);
|
| const V8DOMConfiguration::ConstantConfiguration constantFeature1EnabledConst2Configuration = {"FEATURE1_ENABLED_CONST2", 2, 0, V8DOMConfiguration::ConstantTypeShort};
|
| V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFeature1EnabledConst2Configuration);
|
| + if (Experiments::isApiEnabledWithoutMessage(ec, "FeatureName1")) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature1RuntimeAndExperimentEnabledConst1Configuration = {"FEATURE1_RUNTIME_AND_EXPERIMENT_ENABLED_CONST1", 1, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFeature1RuntimeAndExperimentEnabledConst1Configuration);
|
| + }
|
| + if (Experiments::isApiEnabledWithoutMessage(ec, "FeatureName1")) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature1RuntimeAndExperimentEnabledConst2Configuration = {"FEATURE1_RUNTIME_AND_EXPERIMENT_ENABLED_CONST2", 2, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFeature1RuntimeAndExperimentEnabledConst2Configuration);
|
| + }
|
| }
|
| if (RuntimeEnabledFeatures::featureName2Enabled()) {
|
| const V8DOMConfiguration::ConstantConfiguration constantFeature2EnabledConst1Configuration = {"FEATURE2_ENABLED_CONST1", 3, 0, V8DOMConfiguration::ConstantTypeShort};
|
| V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFeature2EnabledConst1Configuration);
|
| const V8DOMConfiguration::ConstantConfiguration constantFeature2EnabledConst2Configuration = {"FEATURE2_ENABLED_CONST2", 4, 0, V8DOMConfiguration::ConstantTypeShort};
|
| V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFeature2EnabledConst2Configuration);
|
| + if (Experiments::isApiEnabledWithoutMessage(ec, "FeatureName2")) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature2RuntimeAndExperimentEnabledConst1Configuration = {"FEATURE2_RUNTIME_AND_EXPERIMENT_ENABLED_CONST1", 3, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFeature2RuntimeAndExperimentEnabledConst1Configuration);
|
| + }
|
| + if (Experiments::isApiEnabledWithoutMessage(ec, "FeatureName2")) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature2RuntimeAndExperimentEnabledConst2Configuration = {"FEATURE2_RUNTIME_AND_EXPERIMENT_ENABLED_CONST2", 4, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFeature2RuntimeAndExperimentEnabledConst2Configuration);
|
| + }
|
| }
|
| if (RuntimeEnabledFeatures::featureName3Enabled()) {
|
| const V8DOMConfiguration::ConstantConfiguration constantFeature3EnabledConst1Configuration = {"FEATURE3_ENABLED_CONST1", 5, 0, V8DOMConfiguration::ConstantTypeShort};
|
| V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFeature3EnabledConst1Configuration);
|
| + if (Experiments::isApiEnabledWithoutMessage(ec, "FeatureName3")) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFeature3RuntimeAndExperimentEnabledConst1Configuration = {"FEATURE3_RUNTIME_AND_EXPERIMENT_ENABLED_CONST1", 5, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFeature3RuntimeAndExperimentEnabledConst1Configuration);
|
| + }
|
| }
|
| V8DOMConfiguration::installConstantWithGetter(isolate, functionTemplate, prototypeTemplate, "DEPRECATED_CONSTANT", TestObjectV8Internal::DEPRECATED_CONSTANTConstantGetterCallback);
|
| V8DOMConfiguration::installConstantWithGetter(isolate, functionTemplate, prototypeTemplate, "MEASURED_CONSTANT", TestObjectV8Internal::MEASURED_CONSTANTConstantGetterCallback);
|
| + if (Experiments::isApiEnabledWithoutMessage(ec, "FeatureName1")) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFEATURE1_EXPERIMENT_ENABLED_CONST1Configuration = {"FEATURE1_EXPERIMENT_ENABLED_CONST1", 1, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFEATURE1_EXPERIMENT_ENABLED_CONST1Configuration);
|
| + }
|
| + if (Experiments::isApiEnabledWithoutMessage(ec, "FeatureName1")) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFEATURE1_EXPERIMENT_ENABLED_CONST2Configuration = {"FEATURE1_EXPERIMENT_ENABLED_CONST2", 2, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFEATURE1_EXPERIMENT_ENABLED_CONST2Configuration);
|
| + }
|
| + if (Experiments::isApiEnabledWithoutMessage(ec, "FeatureName2")) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFEATURE2_EXPERIMENT_ENABLED_CONST1Configuration = {"FEATURE2_EXPERIMENT_ENABLED_CONST1", 3, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFEATURE2_EXPERIMENT_ENABLED_CONST1Configuration);
|
| + }
|
| + if (Experiments::isApiEnabledWithoutMessage(ec, "FeatureName2")) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFEATURE2_EXPERIMENT_ENABLED_CONST2Configuration = {"FEATURE2_EXPERIMENT_ENABLED_CONST2", 4, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFEATURE2_EXPERIMENT_ENABLED_CONST2Configuration);
|
| + }
|
| + if (Experiments::isApiEnabledWithoutMessage(ec, "FeatureName3")) {
|
| + const V8DOMConfiguration::ConstantConfiguration constantFEATURE3_EXPERIMENT_ENABLED_CONST1Configuration = {"FEATURE3_EXPERIMENT_ENABLED_CONST1", 5, 0, V8DOMConfiguration::ConstantTypeShort};
|
| + V8DOMConfiguration::installConstant(isolate, functionTemplate, prototypeTemplate, constantFEATURE3_EXPERIMENT_ENABLED_CONST1Configuration);
|
| + }
|
| static_assert(0 == TestObject::CONST_VALUE_0, "the value of TestObject_CONST_VALUE_0 does not match with implementation");
|
| static_assert(1 == TestObject::CONST_VALUE_1, "the value of TestObject_CONST_VALUE_1 does not match with implementation");
|
| static_assert(2 == TestObject::CONST_VALUE_2, "the value of TestObject_CONST_VALUE_2 does not match with implementation");
|
| @@ -13348,12 +13733,22 @@ static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function
|
| static_assert(-0x1A == TestObject::CONST_VALUE_16, "the value of TestObject_CONST_VALUE_16 does not match with implementation");
|
| static_assert(-0X1a == TestObject::CONST_VALUE_17, "the value of TestObject_CONST_VALUE_17 does not match with implementation");
|
| static_assert(1 == TestObject::DEPRECATED_CONSTANT, "the value of TestObject_DEPRECATED_CONSTANT does not match with implementation");
|
| + static_assert(1 == TestObject::FEATURE1_EXPERIMENT_ENABLED_CONST1, "the value of TestObject_FEATURE1_EXPERIMENT_ENABLED_CONST1 does not match with implementation");
|
| + static_assert(2 == TestObject::FEATURE1_EXPERIMENT_ENABLED_CONST2, "the value of TestObject_FEATURE1_EXPERIMENT_ENABLED_CONST2 does not match with implementation");
|
| + static_assert(3 == TestObject::FEATURE2_EXPERIMENT_ENABLED_CONST1, "the value of TestObject_FEATURE2_EXPERIMENT_ENABLED_CONST1 does not match with implementation");
|
| + static_assert(4 == TestObject::FEATURE2_EXPERIMENT_ENABLED_CONST2, "the value of TestObject_FEATURE2_EXPERIMENT_ENABLED_CONST2 does not match with implementation");
|
| + static_assert(5 == TestObject::FEATURE3_EXPERIMENT_ENABLED_CONST1, "the value of TestObject_FEATURE3_EXPERIMENT_ENABLED_CONST1 does not match with implementation");
|
| static_assert(1 == TestObject::MEASURED_CONSTANT, "the value of TestObject_MEASURED_CONSTANT does not match with implementation");
|
| static_assert(1 == TestObject::FEATURE1_ENABLED_CONST1, "the value of TestObject_FEATURE1_ENABLED_CONST1 does not match with implementation");
|
| static_assert(2 == TestObject::FEATURE1_ENABLED_CONST2, "the value of TestObject_FEATURE1_ENABLED_CONST2 does not match with implementation");
|
| static_assert(3 == TestObject::FEATURE2_ENABLED_CONST1, "the value of TestObject_FEATURE2_ENABLED_CONST1 does not match with implementation");
|
| static_assert(4 == TestObject::FEATURE2_ENABLED_CONST2, "the value of TestObject_FEATURE2_ENABLED_CONST2 does not match with implementation");
|
| static_assert(5 == TestObject::FEATURE3_ENABLED_CONST1, "the value of TestObject_FEATURE3_ENABLED_CONST1 does not match with implementation");
|
| + static_assert(1 == TestObject::FEATURE1_RUNTIME_AND_EXPERIMENT_ENABLED_CONST1, "the value of TestObject_FEATURE1_RUNTIME_AND_EXPERIMENT_ENABLED_CONST1 does not match with implementation");
|
| + static_assert(2 == TestObject::FEATURE1_RUNTIME_AND_EXPERIMENT_ENABLED_CONST2, "the value of TestObject_FEATURE1_RUNTIME_AND_EXPERIMENT_ENABLED_CONST2 does not match with implementation");
|
| + static_assert(3 == TestObject::FEATURE2_RUNTIME_AND_EXPERIMENT_ENABLED_CONST1, "the value of TestObject_FEATURE2_RUNTIME_AND_EXPERIMENT_ENABLED_CONST1 does not match with implementation");
|
| + static_assert(4 == TestObject::FEATURE2_RUNTIME_AND_EXPERIMENT_ENABLED_CONST2, "the value of TestObject_FEATURE2_RUNTIME_AND_EXPERIMENT_ENABLED_CONST2 does not match with implementation");
|
| + static_assert(5 == TestObject::FEATURE3_RUNTIME_AND_EXPERIMENT_ENABLED_CONST1, "the value of TestObject_FEATURE3_RUNTIME_AND_EXPERIMENT_ENABLED_CONST1 does not match with implementation");
|
| static_assert(1 == TestObject::CONST_IMPL, "the value of TestObject_CONST_IMPL does not match with implementation");
|
| v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(TestObjectV8Internal::indexedPropertyGetterCallback, TestObjectV8Internal::indexedPropertySetterCallback, 0, TestObjectV8Internal::indexedPropertyDeleterCallback, indexedPropertyEnumerator<TestObject>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
|
| instanceTemplate->SetHandler(indexedPropertyHandlerConfig);
|
| @@ -13367,6 +13762,18 @@ static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function
|
| }
|
| const V8DOMConfiguration::MethodConfiguration doNotCheckSignatureVoidMethodMethodConfiguration = {"doNotCheckSignatureVoidMethod", TestObjectV8Internal::doNotCheckSignatureVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTemplate, functionTemplate, v8::Local<v8::Signature>(), doNotCheckSignatureVoidMethodMethodConfiguration);
|
| + if (Experiments::isApiEnabledWithoutMessage(currentExecutionContext(isolate), "FeatureName")) {
|
| + const V8DOMConfiguration::MethodConfiguration experimentEnabledVoidMethodMethodConfiguration = {"experimentEnabledVoidMethod", TestObjectV8Internal::experimentEnabledVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTemplate, functionTemplate, defaultSignature, experimentEnabledVoidMethodMethodConfiguration);
|
| + }
|
| + if (Experiments::isApiEnabledWithoutMessage(currentExecutionContext(isolate), "FeatureName")) {
|
| + const V8DOMConfiguration::MethodConfiguration perWorldBindingsExperimentEnabledVoidMethodMethodConfiguration = {"perWorldBindingsExperimentEnabledVoidMethod", TestObjectV8Internal::perWorldBindingsExperimentEnabledVoidMethodMethodCallback, TestObjectV8Internal::perWorldBindingsExperimentEnabledVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTemplate, functionTemplate, defaultSignature, perWorldBindingsExperimentEnabledVoidMethodMethodConfiguration);
|
| + }
|
| + if (Experiments::isApiEnabledWithoutMessage(currentExecutionContext(isolate), "FeatureName")) {
|
| + const V8DOMConfiguration::MethodConfiguration experimentEnabledOverloadedVoidMethodMethodConfiguration = {"experimentEnabledOverloadedVoidMethod", TestObjectV8Internal::experimentEnabledOverloadedVoidMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| + V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTemplate, functionTemplate, defaultSignature, experimentEnabledOverloadedVoidMethodMethodConfiguration);
|
| + }
|
| if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| const V8DOMConfiguration::MethodConfiguration runtimeEnabledVoidMethodMethodConfiguration = {"runtimeEnabledVoidMethod", TestObjectV8Internal::runtimeEnabledVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype};
|
| V8DOMConfiguration::installMethod(isolate, instanceTemplate, prototypeTemplate, functionTemplate, defaultSignature, runtimeEnabledVoidMethodMethodConfiguration);
|
| @@ -13412,6 +13819,9 @@ void V8TestObject::preparePrototypeAndInterfaceObject(v8::Local<v8::Context> con
|
| unscopeables = prototypeObject->Get(context, unscopablesSymbol).ToLocalChecked().As<v8::Object>();
|
| else
|
| unscopeables = v8::Object::New(isolate);
|
| + if (Experiments::isApiEnabledWithoutMessage(currentExecutionContext(isolate), "FeatureName")) {
|
| + unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeableExperimentEnabledLongAttribute"), v8::True(isolate)).FromJust();
|
| + }
|
| unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeableLongAttribute"), v8::True(isolate)).FromJust();
|
| if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| unscopeables->CreateDataProperty(context, v8AtomicString(isolate, "unscopeableRuntimeEnabledLongAttribute"), v8::True(isolate)).FromJust();
|
|
|