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

Unified 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, 8 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/attributes.cpp
diff --git a/Source/bindings/templates/attributes.cpp b/Source/bindings/templates/attributes.cpp
index f3bef9a74b4fa7a889d304e18ad417ba72a0b61b..8fa9ec315935210da2bbee2f2e6338b2ba3ad101 100644
--- a/Source/bindings/templates/attributes.cpp
+++ b/Source/bindings/templates/attributes.cpp
@@ -171,7 +171,7 @@ v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info
{% if world_suffix in attribute.activity_logging_world_list_for_getter %}
DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
if (world.activityLogger())
- world.activityLogger()->log("{{interface_name}}.{{attribute.name}}", 0, 0, "Getter");
+ world.activityLogger()->logGetter("{{interface_name}}.{{attribute.name}}");
{% endif %}
{% if attribute.has_custom_getter %}
{{v8_class}}::{{attribute.name}}AttributeGetterCustom(info);
@@ -323,8 +323,18 @@ v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackI
{% if world_suffix in attribute.activity_logging_world_list_for_setter %}
DOMWrapperWorld& world = DOMWrapperWorld::current(info.GetIsolate());
if (world.activityLogger()) {
- v8::Handle<v8::Value> loggerArg[] = { v8Value };
- world.activityLogger()->log("{{interface_name}}.{{attribute.name}}", 1, &loggerArg[0], "Setter");
+ {% if attribute.activity_logging_include_old_value_for_setter %}
+ {{cpp_class}}* impl = {{v8_class}}::toNative(info.Holder());
+ {% if attribute.cpp_value_original %}
+ {{attribute.cpp_type}} original = {{attribute.cpp_value_original}};
+ {% else %}
+ {{attribute.cpp_type}} original = {{attribute.cpp_value}};
+ {% endif %}
+ v8::Handle<v8::Value> originalValue = {{attribute.cpp_value_to_v8_value}};
+ world.activityLogger()->logSetter("{{interface_name}}.{{attribute.name}}", v8Value, originalValue);
+ {% else %}
+ world.activityLogger()->logSetter("{{interface_name}}.{{attribute.name}}", v8Value);
+ {% endif %}
}
{% endif %}
{% if attribute.is_custom_element_callbacks or attribute.is_reflect %}
« 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