| Index: third_party/WebKit/Source/bindings/templates/attributes.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/templates/attributes.cpp b/third_party/WebKit/Source/bindings/templates/attributes.cpp
|
| index 66401dda85cde0d7254b0e051be5df5164f6ee48..441b774cd3443543628d193b461388a972153d0e 100644
|
| --- a/third_party/WebKit/Source/bindings/templates/attributes.cpp
|
| +++ b/third_party/WebKit/Source/bindings/templates/attributes.cpp
|
| @@ -1,5 +1,4 @@
|
| -{% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_local_cpp_value %}
|
| -
|
| +{% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_local_cpp_value, check_api_experiment %}
|
|
|
| {##############################################################################}
|
| {% macro attribute_getter(attribute, world_suffix) %}
|
| @@ -11,6 +10,9 @@ const v8::PropertyCallbackInfo<v8::Value>& info
|
| const v8::FunctionCallbackInfo<v8::Value>& info
|
| {%- endif %})
|
| {
|
| + {% if attribute.is_api_experiment_enabled %}
|
| + {{check_api_experiment(attribute) | indent}}
|
| + {% endif %}
|
| {% if attribute.is_reflect and not attribute.is_url
|
| and attribute.idl_type == 'DOMString' and is_node
|
| and not attribute.is_implemented_in_private_script %}
|
| @@ -178,6 +180,9 @@ const v8::FunctionCallbackInfo<v8::Value>& info
|
| {% if attribute.measure_as %}
|
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeGetter')}});
|
| {% endif %}
|
| + {% if attribute.is_api_experiment_enabled %}
|
| + {{check_api_experiment(attribute) | indent}}
|
| + {% endif %}
|
| {% if world_suffix in attribute.activity_logging_world_list_for_getter %}
|
| ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentContext());
|
| V8PerContextData* contextData = scriptState->perContextData();
|
| @@ -211,6 +216,9 @@ static void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Loca
|
| {% if attribute.measure_as %}
|
| UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('ConstructorGetter')}});
|
| {% endif %}
|
| + {% if attribute.is_api_experiment_enabled %}
|
| + {{check_api_experiment(attribute) | indent}}
|
| + {% endif %}
|
| v8ConstructorAttributeGetter(property, info);
|
| TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
|
| }
|
| @@ -418,6 +426,10 @@ bool {{v8_class}}::PrivateScript::{{attribute.name}}AttributeGetter(LocalFrame*
|
| if (holder.IsEmpty())
|
| return false;
|
|
|
| + {% if attribute.is_api_experiment_enabled %}
|
| + {{check_api_experiment(attribute, "scriptState->isolate()") | indent}}
|
| + {% endif %}
|
| +
|
| ExceptionState exceptionState(ExceptionState::GetterContext, "{{attribute.name}}", "{{cpp_class}}", scriptState->context()->Global(), scriptState->isolate());
|
| v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "{{cpp_class}}", "{{attribute.name}}", holder);
|
| if (v8Value.IsEmpty())
|
|
|