| OLD | NEW |
| 1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc
al_cpp_value, check_api_experiment %} | 1 {% from 'utilities.cpp' import declare_enum_validation_variable, v8_value_to_loc
al_cpp_value, check_api_experiment %} |
| 2 | 2 |
| 3 {##############################################################################} | 3 {##############################################################################} |
| 4 {% macro attribute_getter(attribute, world_suffix) %} | 4 {% macro attribute_getter(attribute, world_suffix) %} |
| 5 {% filter conditional(attribute.conditional_string) %} | 5 {% filter conditional(attribute.conditional_string) %} |
| 6 static void {{attribute.name}}AttributeGetter{{world_suffix}}( | 6 static void {{attribute.name}}AttributeGetter{{world_suffix}}( |
| 7 {%- if attribute.is_data_type_property %} | 7 {%- if attribute.is_data_type_property %} |
| 8 const v8::PropertyCallbackInfo<v8::Value>& info | 8 const v8::PropertyCallbackInfo<v8::Value>& info |
| 9 {%- else %} | 9 {%- else %} |
| 10 const v8::FunctionCallbackInfo<v8::Value>& info | 10 const v8::FunctionCallbackInfo<v8::Value>& info |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 {% filter conditional(attribute.conditional_string) %} | 168 {% filter conditional(attribute.conditional_string) %} |
| 169 static void {{attribute.name}}AttributeGetterCallback{{world_suffix}}( | 169 static void {{attribute.name}}AttributeGetterCallback{{world_suffix}}( |
| 170 {%- if attribute.is_data_type_property %} | 170 {%- if attribute.is_data_type_property %} |
| 171 v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info | 171 v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info |
| 172 {%- else %} | 172 {%- else %} |
| 173 const v8::FunctionCallbackInfo<v8::Value>& info | 173 const v8::FunctionCallbackInfo<v8::Value>& info |
| 174 {%- endif %}) | 174 {%- endif %}) |
| 175 { | 175 { |
| 176 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 176 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 177 {% if attribute.deprecate_as %} | 177 {% if attribute.deprecate_as %} |
| 178 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); | 178 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); |
| 179 {% endif %} | 179 {% endif %} |
| 180 {% if attribute.measure_as %} | 180 {% if attribute.measure_as %} |
| 181 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeGetter')}}); | 181 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeGetter')}}); |
| 182 {% endif %} | 182 {% endif %} |
| 183 {% if attribute.is_api_experiment_enabled %} | 183 {% if attribute.is_api_experiment_enabled %} |
| 184 {{check_api_experiment(attribute) | indent}} | 184 {{check_api_experiment(attribute) | indent}} |
| 185 {% endif %} | 185 {% endif %} |
| 186 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} | 186 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} |
| 187 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 187 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 188 V8PerContextData* contextData = scriptState->perContextData(); | 188 V8PerContextData* contextData = scriptState->perContextData(); |
| 189 {% if attribute.activity_logging_world_check %} | 189 {% if attribute.activity_logging_world_check %} |
| 190 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) | 190 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) |
| 191 {% else %} | 191 {% else %} |
| (...skipping 12 matching lines...) Expand all Loading... |
| 204 {% endmacro %} | 204 {% endmacro %} |
| 205 | 205 |
| 206 | 206 |
| 207 {##############################################################################} | 207 {##############################################################################} |
| 208 {% macro constructor_getter_callback(attribute, world_suffix) %} | 208 {% macro constructor_getter_callback(attribute, world_suffix) %} |
| 209 {% filter conditional(attribute.conditional_string) %} | 209 {% filter conditional(attribute.conditional_string) %} |
| 210 static void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Loca
l<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& info) | 210 static void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Loca
l<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 211 { | 211 { |
| 212 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 212 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 213 {% if attribute.deprecate_as %} | 213 {% if attribute.deprecate_as %} |
| 214 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); | 214 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); |
| 215 {% endif %} | 215 {% endif %} |
| 216 {% if attribute.measure_as %} | 216 {% if attribute.measure_as %} |
| 217 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as('ConstructorGetter')}}
); | 217 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as('ConstructorGetter')}}
); |
| 218 {% endif %} | 218 {% endif %} |
| 219 {% if attribute.is_api_experiment_enabled %} | 219 {% if attribute.is_api_experiment_enabled %} |
| 220 {{check_api_experiment(attribute) | indent}} | 220 {{check_api_experiment(attribute) | indent}} |
| 221 {% endif %} | 221 {% endif %} |
| 222 v8ConstructorAttributeGetter(property, info); | 222 v8ConstructorAttributeGetter(property, info); |
| 223 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 223 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 224 } | 224 } |
| 225 {% endfilter %} | 225 {% endfilter %} |
| 226 {% endmacro %} | 226 {% endmacro %} |
| 227 | 227 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info | 369 v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInf
o<void>& info |
| 370 {%- else %} | 370 {%- else %} |
| 371 const v8::FunctionCallbackInfo<v8::Value>& info | 371 const v8::FunctionCallbackInfo<v8::Value>& info |
| 372 {%- endif %}) | 372 {%- endif %}) |
| 373 { | 373 { |
| 374 {% if not attribute.is_data_type_property %} | 374 {% if not attribute.is_data_type_property %} |
| 375 v8::Local<v8::Value> v8Value = info[0]; | 375 v8::Local<v8::Value> v8Value = info[0]; |
| 376 {% endif %} | 376 {% endif %} |
| 377 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 377 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 378 {% if attribute.deprecate_as %} | 378 {% if attribute.deprecate_as %} |
| 379 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); | 379 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); |
| 380 {% endif %} | 380 {% endif %} |
| 381 {% if attribute.measure_as %} | 381 {% if attribute.measure_as %} |
| 382 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeSetter')}}); | 382 UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeSetter')}}); |
| 383 {% endif %} | 383 {% endif %} |
| 384 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} | 384 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} |
| 385 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 385 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 386 V8PerContextData* contextData = scriptState->perContextData(); | 386 V8PerContextData* contextData = scriptState->perContextData(); |
| 387 {% if attribute.activity_logging_world_check %} | 387 {% if attribute.activity_logging_world_check %} |
| 388 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) { | 388 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) { |
| 389 {% else %} | 389 {% else %} |
| 390 if (contextData && contextData->activityLogger()) { | 390 if (contextData && contextData->activityLogger()) { |
| 391 {% endif %} | 391 {% endif %} |
| 392 contextData->activityLogger()->logSetter("{{interface_name}}.{{attribute
.name}}", v8Value); | 392 contextData->activityLogger()->logSetter("{{interface_name}}.{{attribute
.name}}", v8Value); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 setter_callback_for_main_world, | 518 setter_callback_for_main_world, |
| 519 wrapper_type_info, | 519 wrapper_type_info, |
| 520 access_control, | 520 access_control, |
| 521 property_attribute, | 521 property_attribute, |
| 522 only_exposed_to_private_script, | 522 only_exposed_to_private_script, |
| 523 property_location(attribute), | 523 property_location(attribute), |
| 524 holder_check, | 524 holder_check, |
| 525 ] %} | 525 ] %} |
| 526 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} | 526 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} |
| 527 {%- endmacro %} | 527 {%- endmacro %} |
| OLD | NEW |