OLD | NEW |
1 {% from 'conversions.cpp' import v8_value_to_local_cpp_value %} | 1 {% from 'conversions.cpp' import v8_value_to_local_cpp_value %} |
2 | 2 |
3 | 3 |
4 {##############################################################################} | 4 {##############################################################################} |
5 {% macro attribute_getter(attribute, world_suffix) %} | 5 {% macro attribute_getter(attribute, world_suffix) %} |
6 {% filter conditional(attribute.conditional_string) %} | 6 {% filter conditional(attribute.conditional_string) %} |
7 static void {{attribute.name}}AttributeGetter{{world_suffix}}( | 7 static void {{attribute.name}}AttributeGetter{{world_suffix}}( |
8 {%- if attribute.is_expose_js_accessors %} | 8 {%- if attribute.is_expose_js_accessors %} |
9 const v8::FunctionCallbackInfo<v8::Value>& info | 9 const v8::FunctionCallbackInfo<v8::Value>& info |
10 {%- else %} | 10 {%- else %} |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 const v8::FunctionCallbackInfo<v8::Value>& info | 150 const v8::FunctionCallbackInfo<v8::Value>& info |
151 {%- else %} | 151 {%- else %} |
152 v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info | 152 v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info |
153 {%- endif %}) | 153 {%- endif %}) |
154 { | 154 { |
155 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 155 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
156 {% if attribute.deprecate_as %} | 156 {% if attribute.deprecate_as %} |
157 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); | 157 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); |
158 {% endif %} | 158 {% endif %} |
159 {% if attribute.measure_as %} | 159 {% if attribute.measure_as %} |
160 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as}}); | 160 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeGetter')}}); |
161 {% endif %} | 161 {% endif %} |
162 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} | 162 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} |
163 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 163 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
164 V8PerContextData* contextData = scriptState->perContextData(); | 164 V8PerContextData* contextData = scriptState->perContextData(); |
165 {% if attribute.activity_logging_world_check %} | 165 {% if attribute.activity_logging_world_check %} |
166 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) | 166 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) |
167 {% else %} | 167 {% else %} |
168 if (contextData && contextData->activityLogger()) | 168 if (contextData && contextData->activityLogger()) |
169 {% endif %} | 169 {% endif %} |
170 contextData->activityLogger()->logGetter("{{interface_name}}.{{attribute
.name}}"); | 170 contextData->activityLogger()->logGetter("{{interface_name}}.{{attribute
.name}}"); |
(...skipping 12 matching lines...) Expand all Loading... |
183 {##############################################################################} | 183 {##############################################################################} |
184 {% macro constructor_getter_callback(attribute, world_suffix) %} | 184 {% macro constructor_getter_callback(attribute, world_suffix) %} |
185 {% filter conditional(attribute.conditional_string) %} | 185 {% filter conditional(attribute.conditional_string) %} |
186 static void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Loca
l<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info) | 186 static void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Loca
l<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info) |
187 { | 187 { |
188 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 188 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
189 {% if attribute.deprecate_as %} | 189 {% if attribute.deprecate_as %} |
190 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); | 190 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); |
191 {% endif %} | 191 {% endif %} |
192 {% if attribute.measure_as %} | 192 {% if attribute.measure_as %} |
193 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as}}); | 193 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as('ConstructorGetter')}}
); |
194 {% endif %} | 194 {% endif %} |
195 {{cpp_class_or_partial}}V8Internal::{{cpp_class}}ConstructorGetter{{world_su
ffix}}(property, info); | 195 {{cpp_class_or_partial}}V8Internal::{{cpp_class}}ConstructorGetter{{world_su
ffix}}(property, info); |
196 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 196 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
197 } | 197 } |
198 {% endfilter %} | 198 {% endfilter %} |
199 {% endmacro %} | 199 {% endmacro %} |
200 | 200 |
201 | 201 |
202 {##############################################################################} | 202 {##############################################################################} |
203 {% macro attribute_setter(attribute, world_suffix) %} | 203 {% macro attribute_setter(attribute, world_suffix) %} |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 {%- endif %}) | 298 {%- endif %}) |
299 { | 299 { |
300 {% if attribute.is_expose_js_accessors %} | 300 {% if attribute.is_expose_js_accessors %} |
301 v8::Local<v8::Value> v8Value = info[0]; | 301 v8::Local<v8::Value> v8Value = info[0]; |
302 {% endif %} | 302 {% endif %} |
303 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 303 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
304 {% if attribute.deprecate_as %} | 304 {% if attribute.deprecate_as %} |
305 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); | 305 UseCounter::countDeprecationIfNotPrivateScript(info.GetIsolate(), callingExe
cutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); |
306 {% endif %} | 306 {% endif %} |
307 {% if attribute.measure_as %} | 307 {% if attribute.measure_as %} |
308 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as}}); | 308 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeSetter')}}); |
309 {% endif %} | 309 {% endif %} |
310 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} | 310 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} |
311 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); | 311 ScriptState* scriptState = ScriptState::from(info.GetIsolate()->GetCurrentCo
ntext()); |
312 V8PerContextData* contextData = scriptState->perContextData(); | 312 V8PerContextData* contextData = scriptState->perContextData(); |
313 {% if attribute.activity_logging_world_check %} | 313 {% if attribute.activity_logging_world_check %} |
314 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) { | 314 if (scriptState->world().isIsolatedWorld() && contextData && contextData->ac
tivityLogger()) { |
315 {% else %} | 315 {% else %} |
316 if (contextData && contextData->activityLogger()) { | 316 if (contextData && contextData->activityLogger()) { |
317 {% endif %} | 317 {% endif %} |
318 contextData->activityLogger()->logSetter("{{interface_name}}.{{attribute
.name}}", v8Value); | 318 contextData->activityLogger()->logSetter("{{interface_name}}.{{attribute
.name}}", v8Value); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 access_control, | 428 access_control, |
429 property_attribute, | 429 property_attribute, |
430 only_exposed_to_private_script, | 430 only_exposed_to_private_script, |
431 ] %} | 431 ] %} |
432 {% if not attribute.is_expose_js_accessors %} | 432 {% if not attribute.is_expose_js_accessors %} |
433 {% set attribute_configuration_list = attribute_configuration_list | 433 {% set attribute_configuration_list = attribute_configuration_list |
434 + [on_prototype] %} | 434 + [on_prototype] %} |
435 {% endif %} | 435 {% endif %} |
436 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} | 436 {{'{'}}{{attribute_configuration_list | join(', ')}}{{'}'}} |
437 {%- endmacro %} | 437 {%- endmacro %} |
OLD | NEW |