| Index: Source/bindings/tests/results/core/V8TestObject.cpp
|
| diff --git a/Source/bindings/tests/results/core/V8TestObject.cpp b/Source/bindings/tests/results/core/V8TestObject.cpp
|
| index 7b7b23e05b339412f700250ba47ca8823aa145f1..63eedf547322b466f3f6a715b4d299dbfbeeb3c5 100644
|
| --- a/Source/bindings/tests/results/core/V8TestObject.cpp
|
| +++ b/Source/bindings/tests/results/core/V8TestObject.cpp
|
| @@ -5204,6 +5204,38 @@ static void unscopeableLongAttributeAttributeSetterCallback(v8::Local<v8::Name>,
|
| TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| }
|
|
|
| +static void unscopeableRuntimeEnabledLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + TestObject* impl = V8TestObject::toImpl(holder);
|
| + v8SetReturnValueInt(info, impl->unscopeableRuntimeEnabledLongAttribute());
|
| +}
|
| +
|
| +static void unscopeableRuntimeEnabledLongAttributeAttributeGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
|
| + TestObjectV8Internal::unscopeableRuntimeEnabledLongAttributeAttributeGetter(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| +static void unscopeableRuntimeEnabledLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
|
| +{
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + ExceptionState exceptionState(ExceptionState::SetterContext, "unscopeableRuntimeEnabledLongAttribute", "TestObject", holder, info.GetIsolate());
|
| + TestObject* impl = V8TestObject::toImpl(holder);
|
| + int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, exceptionState);
|
| + if (exceptionState.throwIfNeeded())
|
| + return;
|
| + impl->setUnscopeableRuntimeEnabledLongAttribute(cppValue);
|
| +}
|
| +
|
| +static void unscopeableRuntimeEnabledLongAttributeAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
|
| + TestObjectV8Internal::unscopeableRuntimeEnabledLongAttributeAttributeSetter(v8Value, info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| v8::Local<v8::Object> holder = info.Holder();
|
| @@ -5572,6 +5604,19 @@ static void unscopeableVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v
|
| TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| }
|
|
|
| +static void unscopeableRuntimeEnabledVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| + impl->unscopeableRuntimeEnabledVoidMethod();
|
| +}
|
| +
|
| +static void unscopeableRuntimeEnabledVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
|
| + TestObjectV8Internal::unscopeableRuntimeEnabledVoidMethodMethod(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| TestObject* impl = V8TestObject::toImpl(info.Holder());
|
| @@ -12585,6 +12630,11 @@ static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function
|
| V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototypeTemplate, attributeConfiguration);
|
| }
|
| #endif // ENABLE(CONDITION)
|
| + if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| + static const V8DOMConfiguration::AttributeConfiguration attributeConfiguration =\
|
| + {"unscopeableRuntimeEnabledLongAttribute", TestObjectV8Internal::unscopeableRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopeableRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance};
|
| + V8DOMConfiguration::installAttribute(isolate, instanceTemplate, prototypeTemplate, attributeConfiguration);
|
| + }
|
| static const V8DOMConfiguration::ConstantConfiguration V8TestObjectConstants[] = {
|
| {"CONST_VALUE_0", 0, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| {"CONST_VALUE_1", 1, 0, 0, V8DOMConfiguration::ConstantTypeUnsignedShort},
|
| @@ -12648,6 +12698,12 @@ static void installV8TestObjectTemplate(v8::Local<v8::FunctionTemplate> function
|
| }
|
| static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestObjectV8Internal::iteratorMethodCallback, 0, V8DOMConfiguration::ExposedToAllScripts };
|
| V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignature, v8::DontDelete, symbolKeyedIteratorConfiguration);
|
| + if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| + const V8DOMConfiguration::MethodConfiguration unscopeableRuntimeEnabledVoidMethodMethodConfiguration = {
|
| + "unscopeableRuntimeEnabledVoidMethod", TestObjectV8Internal::unscopeableRuntimeEnabledVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
|
| + };
|
| + V8DOMConfiguration::installMethod(isolate, prototypeTemplate, defaultSignature, v8::None, unscopeableRuntimeEnabledVoidMethodMethodConfiguration);
|
| + }
|
| const V8DOMConfiguration::MethodConfiguration staticVoidMethodMethodConfiguration = {
|
| "staticVoidMethod", TestObjectV8Internal::staticVoidMethodMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts,
|
| };
|
| @@ -12733,6 +12789,12 @@ void V8TestObject::preparePrototypeObject(v8::Isolate* isolate, v8::Local<v8::Ob
|
| else
|
| unscopeables = v8::Object::New(isolate);
|
| unscopeables->ForceSet(v8Context, v8AtomicString(isolate, "unscopeableLongAttribute"), v8::True(isolate)).FromJust();
|
| + if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| + unscopeables->ForceSet(v8Context, v8AtomicString(isolate, "unscopeableRuntimeEnabledLongAttribute"), v8::True(isolate)).FromJust();
|
| + }
|
| + if (RuntimeEnabledFeatures::featureNameEnabled()) {
|
| + unscopeables->ForceSet(v8Context, v8AtomicString(isolate, "unscopeableRuntimeEnabledVoidMethod"), v8::True(isolate)).FromJust();
|
| + }
|
| unscopeables->ForceSet(v8Context, v8AtomicString(isolate, "unscopeableVoidMethod"), v8::True(isolate)).FromJust();
|
| prototypeObject->ForceSet(v8Context, unscopablesSymbol, unscopeables).FromJust();
|
| }
|
|
|