Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: Source/bindings/templates/attributes.cpp

Issue 213783002: Pass current value of attributes to WebDOMActivityLogger Setter logs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Latest master Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/scripts/v8_attributes.py ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter"); 164 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMGetter");
165 {% if attribute.deprecate_as %} 165 {% if attribute.deprecate_as %}
166 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{attribute.deprecate_as}}); 166 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{attribute.deprecate_as}});
167 {% endif %} 167 {% endif %}
168 {% if attribute.measure_as %} 168 {% if attribute.measure_as %}
169 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{ attribute.measure_as}}); 169 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{ attribute.measure_as}});
170 {% endif %} 170 {% endif %}
171 {% if world_suffix in attribute.activity_logging_world_list_for_getter %} 171 {% if world_suffix in attribute.activity_logging_world_list_for_getter %}
172 DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate()); 172 DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
173 if (world.activityLogger()) 173 if (world.activityLogger())
174 world.activityLogger()->log("{{interface_name}}.{{attribute.name}}", 0, 0, "Getter"); 174 world.activityLogger()->logGetter("{{interface_name}}.{{attribute.name}} ");
175 {% endif %} 175 {% endif %}
176 {% if attribute.has_custom_getter %} 176 {% if attribute.has_custom_getter %}
177 {{v8_class}}::{{attribute.name}}AttributeGetterCustom(info); 177 {{v8_class}}::{{attribute.name}}AttributeGetterCustom(info);
178 {% else %} 178 {% else %}
179 {{cpp_class}}V8Internal::{{attribute.name}}AttributeGetter{{world_suffix}}(i nfo); 179 {{cpp_class}}V8Internal::{{attribute.name}}AttributeGetter{{world_suffix}}(i nfo);
180 {% endif %} 180 {% endif %}
181 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 181 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
182 } 182 }
183 {% endfilter %} 183 {% endfilter %}
184 {% endmacro %} 184 {% endmacro %}
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 316 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
317 {% if attribute.deprecate_as %} 317 {% if attribute.deprecate_as %}
318 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{attribute.deprecate_as}}); 318 UseCounter::countDeprecation(callingExecutionContext(info.GetIsolate()), Use Counter::{{attribute.deprecate_as}});
319 {% endif %} 319 {% endif %}
320 {% if attribute.measure_as %} 320 {% if attribute.measure_as %}
321 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{ attribute.measure_as}}); 321 UseCounter::count(callingExecutionContext(info.GetIsolate()), UseCounter::{{ attribute.measure_as}});
322 {% endif %} 322 {% endif %}
323 {% if world_suffix in attribute.activity_logging_world_list_for_setter %} 323 {% if world_suffix in attribute.activity_logging_world_list_for_setter %}
324 DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate()); 324 DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
325 if (world.activityLogger()) { 325 if (world.activityLogger()) {
326 v8::Handle<v8::Value> loggerArg[] = { v8Value }; 326 {% if attribute.activity_logging_include_old_value_for_setter %}
327 world.activityLogger()->log("{{interface_name}}.{{attribute.name}}", 1, &loggerArg[0], "Setter"); 327 {{cpp_class}}* impl = {{v8_class}}::toNative(info.Holder());
328 {% if attribute.cpp_value_original %}
329 {{attribute.cpp_type}} original = {{attribute.cpp_value_original}};
330 {% else %}
331 {{attribute.cpp_type}} original = {{attribute.cpp_value}};
332 {% endif %}
333 v8::Handle<v8::Value> originalValue = {{attribute.cpp_value_to_v8_value} };
334 world.activityLogger()->logSetter("{{interface_name}}.{{attribute.name}} ", v8Value, originalValue);
335 {% else %}
336 world.activityLogger()->logSetter("{{interface_name}}.{{attribute.name}} ", v8Value);
337 {% endif %}
328 } 338 }
329 {% endif %} 339 {% endif %}
330 {% if attribute.is_custom_element_callbacks or attribute.is_reflect %} 340 {% if attribute.is_custom_element_callbacks or attribute.is_reflect %}
331 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope; 341 CustomElementCallbackDispatcher::CallbackDeliveryScope deliveryScope;
332 {% endif %} 342 {% endif %}
333 {% if attribute.has_custom_setter %} 343 {% if attribute.has_custom_setter %}
334 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(v8Value, info); 344 {{v8_class}}::{{attribute.name}}AttributeSetterCustom(v8Value, info);
335 {% else %} 345 {% else %}
336 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(v 8Value, info); 346 {{cpp_class}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffix}}(v 8Value, info);
337 {% endif %} 347 {% endif %}
338 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 348 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
339 } 349 }
340 {% endfilter %} 350 {% endfilter %}
341 {% endmacro %} 351 {% endmacro %}
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_attributes.py ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698