| OLD | NEW |
| 1 {##############################################################################} | 1 {##############################################################################} |
| 2 {% macro attribute_getter(attribute, world_suffix) %} | 2 {% macro attribute_getter(attribute, world_suffix) %} |
| 3 {% filter conditional(attribute.conditional_string) %} | 3 {% filter conditional(attribute.conditional_string) %} |
| 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}( | 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}( |
| 5 {%- if attribute.is_expose_js_accessors %} | 5 {%- if attribute.is_expose_js_accessors %} |
| 6 const v8::FunctionCallbackInfo<v8::Value>& info | 6 const v8::FunctionCallbackInfo<v8::Value>& info |
| 7 {%- else %} | 7 {%- else %} |
| 8 const v8::PropertyCallbackInfo<v8::Value>& info | 8 const v8::PropertyCallbackInfo<v8::Value>& info |
| 9 {%- endif %}) | 9 {%- endif %}) |
| 10 { | 10 { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 {% filter conditional(attribute.conditional_string) %} | 140 {% filter conditional(attribute.conditional_string) %} |
| 141 static void {{attribute.name}}AttributeGetterCallback{{world_suffix}}( | 141 static void {{attribute.name}}AttributeGetterCallback{{world_suffix}}( |
| 142 {%- if attribute.is_expose_js_accessors %} | 142 {%- if attribute.is_expose_js_accessors %} |
| 143 const v8::FunctionCallbackInfo<v8::Value>& info | 143 const v8::FunctionCallbackInfo<v8::Value>& info |
| 144 {%- else %} | 144 {%- else %} |
| 145 v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info | 145 v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info |
| 146 {%- endif %}) | 146 {%- endif %}) |
| 147 { | 147 { |
| 148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 148 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 149 {% if attribute.deprecate_as %} | 149 {% if attribute.deprecate_as %} |
| 150 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::{{attribute.deprecate_as}}); | 150 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); |
| 151 {% endif %} | 151 {% endif %} |
| 152 {% if attribute.measure_as %} | 152 {% if attribute.measure_as %} |
| 153 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{
attribute.measure_as}}); | 153 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as}}); |
| 154 {% endif %} | 154 {% endif %} |
| 155 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} | 155 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} |
| 156 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 156 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 157 V8PerContextData* contextData = scriptState->perContextData(); | 157 V8PerContextData* contextData = scriptState->perContextData(); |
| 158 {% if attribute.activity_logging_world_check %} | 158 {% if attribute.activity_logging_world_check %} |
| 159 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) | 159 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) |
| 160 {% else %} | 160 {% else %} |
| 161 if (contextData && contextData->activityLogger()) | 161 if (contextData && contextData->activityLogger()) |
| 162 {% endif %} | 162 {% endif %} |
| 163 contextData->activityLogger()->logGetter("{{interface_name}}.{{attribute
.name}}"); | 163 contextData->activityLogger()->logGetter("{{interface_name}}.{{attribute
.name}}"); |
| 164 {% endif %} | 164 {% endif %} |
| 165 {% if attribute.has_custom_getter %} | 165 {% if attribute.has_custom_getter %} |
| 166 {{v8_class}}::{{attribute.name}}AttributeGetterCustom(info); | 166 {{v8_class}}::{{attribute.name}}AttributeGetterCustom(info); |
| 167 {% else %} | 167 {% else %} |
| 168 {{cpp_class}}V8Internal::{{attribute.name}}AttributeGetter{{world_suffix}}(i
nfo); | 168 {{cpp_class}}V8Internal::{{attribute.name}}AttributeGetter{{world_suffix}}(i
nfo); |
| 169 {% endif %} | 169 {% endif %} |
| 170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 170 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 171 } | 171 } |
| 172 {% endfilter %} | 172 {% endfilter %} |
| 173 {% endmacro %} | 173 {% endmacro %} |
| 174 | 174 |
| 175 | 175 |
| 176 {##############################################################################} | 176 {##############################################################################} |
| 177 {% macro constructor_getter_callback(attribute, world_suffix) %} | 177 {% macro constructor_getter_callback(attribute, world_suffix) %} |
| 178 {% filter conditional(attribute.conditional_string) %} | 178 {% filter conditional(attribute.conditional_string) %} |
| 179 static void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Loca
l<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info) | 179 static void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Loca
l<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 180 { | 180 { |
| 181 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 181 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 182 {% if attribute.deprecate_as %} | 182 {% if attribute.deprecate_as %} |
| 183 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::{{attribute.deprecate_as}}); | 183 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); |
| 184 {% endif %} | 184 {% endif %} |
| 185 {% if attribute.measure_as %} | 185 {% if attribute.measure_as %} |
| 186 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{
attribute.measure_as}}); | 186 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as}}); |
| 187 {% endif %} | 187 {% endif %} |
| 188 {{cpp_class}}V8Internal::{{cpp_class}}ConstructorGetter{{world_suffix}}(prop
erty, info); | 188 {{cpp_class}}V8Internal::{{cpp_class}}ConstructorGetter{{world_suffix}}(prop
erty, info); |
| 189 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 189 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 190 } | 190 } |
| 191 {% endfilter %} | 191 {% endfilter %} |
| 192 {% endmacro %} | 192 {% endmacro %} |
| 193 | 193 |
| 194 | 194 |
| 195 {##############################################################################} | 195 {##############################################################################} |
| 196 {% macro attribute_setter(attribute, world_suffix) %} | 196 {% macro attribute_setter(attribute, world_suffix) %} |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 const v8::FunctionCallbackInfo<v8::Value>& info | 293 const v8::FunctionCallbackInfo<v8::Value>& info |
| 294 {%- else %} | 294 {%- else %} |
| 295 v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info | 295 v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
nfo<void>& info |
| 296 {%- endif %}) | 296 {%- endif %}) |
| 297 { | 297 { |
| 298 {% if attribute.is_expose_js_accessors %} | 298 {% if attribute.is_expose_js_accessors %} |
| 299 v8::Local<v8::Value> v8Value = info[0]; | 299 v8::Local<v8::Value> v8Value = info[0]; |
| 300 {% endif %} | 300 {% endif %} |
| 301 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 301 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 302 {% if attribute.deprecate_as %} | 302 {% if attribute.deprecate_as %} |
| 303 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use
Counter::{{attribute.deprecate_as}}); | 303 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); |
| 304 {% endif %} | 304 {% endif %} |
| 305 {% if attribute.measure_as %} | 305 {% if attribute.measure_as %} |
| 306 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{
attribute.measure_as}}); | 306 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as}}); |
| 307 {% endif %} | 307 {% endif %} |
| 308 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} | 308 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} |
| 309 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 309 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
| 310 V8PerContextData* contextData = scriptState->perContextData(); | 310 V8PerContextData* contextData = scriptState->perContextData(); |
| 311 {% if attribute.activity_logging_world_check %} | 311 {% if attribute.activity_logging_world_check %} |
| 312 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) { | 312 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) { |
| 313 {% else %} | 313 {% else %} |
| 314 if (contextData && contextData->activityLogger()) { | 314 if (contextData && contextData->activityLogger()) { |
| 315 {% endif %} | 315 {% endif %} |
| 316 contextData->activityLogger()->logSetter("{{interface_name}}.{{attribute
.name}}", v8Value); | 316 contextData->activityLogger()->logSetter("{{interface_name}}.{{attribute
.name}}", v8Value); |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 access_control, | 427 access_control, |
| 428 property_attribute, | 428 property_attribute, |
| 429 only_exposed_to_private_script, | 429 only_exposed_to_private_script, |
| 430 ] %} | 430 ] %} |
| 431 {% if not attribute.is_expose_js_accessors %} | 431 {% if not attribute.is_expose_js_accessors %} |
| 432 {% set attribute_configuration_list = attribute_configuration_list | 432 {% set attribute_configuration_list = attribute_configuration_list |
| 433 + [on_prototype] %} | 433 + [on_prototype] %} |
| 434 {% endif %} | 434 {% endif %} |
| 435 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} | 435 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} |
| 436 {%- endmacro %} | 436 {%- endmacro %} |
| OLD | NEW |