| Index: Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
|
| diff --git a/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp b/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
|
| index e748f70dad3c8346713c1863dd100ee597d3e6de..5a79dc5bd90e720585d5c56e6496bc548f55b792 100644
|
| --- a/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
|
| +++ b/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
|
| @@ -53,6 +53,20 @@ static void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCal
|
| TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| }
|
|
|
| +static void isTrustedAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + v8::Local<v8::Object> holder = info.Holder();
|
| + TestInterfaceEventInitConstructor* impl = V8TestInterfaceEventInitConstructor::toImpl(holder);
|
| + v8SetReturnValueBool(info, impl->isTrusted());
|
| +}
|
| +
|
| +static void isTrustedAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| +{
|
| + TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
|
| + TestInterfaceEventInitConstructorV8Internal::isTrustedAttributeGetter(info);
|
| + TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| +}
|
| +
|
| static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInterfaceEventInitConstructor", info.Holder(), info.GetIsolate());
|
| @@ -119,6 +133,11 @@ static void installV8TestInterfaceEventInitConstructorTemplate(v8::Local<v8::Fun
|
| ALLOW_UNUSED_LOCAL(instanceTemplate);
|
| v8::Local<v8::ObjectTemplate> prototypeTemplate = functionTemplate->PrototypeTemplate();
|
| ALLOW_UNUSED_LOCAL(prototypeTemplate);
|
| + if (RuntimeEnabledFeatures::trustedEventsEnabled()) {
|
| + static const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = \
|
| + {"isTrusted", TestInterfaceEventInitConstructorV8Internal::isTrustedAttributeGetterCallback, 0, 0, 0, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder};
|
| + V8DOMConfiguration::installAccessor(isolate, instanceTemplate, prototypeTemplate, functionTemplate, defaultSignature, accessorConfiguration);
|
| + }
|
|
|
| // Custom toString template
|
| functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData::from(isolate)->toStringTemplate());
|
|
|