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

Unified Diff: Source/bindings/templates/attributes.cpp

Issue 31503002: IDL compiler: [ActivityLogging] for setters (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years, 2 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/unstable/v8_utilities.py ('k') | Source/bindings/templates/interface_base.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 3a7fd868b6132f68c2ff689cf34813184b2def13..c7c1345d5ff23fb44a05fe882844796c581365ab 100644
--- a/Source/bindings/templates/attributes.cpp
+++ b/Source/bindings/templates/attributes.cpp
@@ -86,7 +86,7 @@ static void {{attribute.name}}AttributeGetterCallback{{world_suffix}}(v8::Local<
{% if attribute.measure_as %}
UseCounter::count(activeDOMWindow(), UseCounter::{{attribute.measure_as}});
{% endif %}
- {% if world_suffix in attribute.activity_logging_getter %}
+ {% if world_suffix in attribute.activity_logging_world_list_for_getter %}
V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
if (contextData && contextData->activityLogger())
contextData->activityLogger()->log("{{interface_name}}.{{attribute.name}}", 0, 0, "Getter");
@@ -138,6 +138,13 @@ static void {{attribute.name}}AttributeSetterCallback{{world_suffix}}(v8::Local<
{% if attribute.deprecate_as %}
UseCounter::countDeprecation(activeExecutionContext(), UseCounter::{{attribute.deprecate_as}});
{% endif %}
+ {% if world_suffix in attribute.activity_logging_world_list_for_setter %}
+ V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->GetCurrentContext());
+ if (contextData && contextData->activityLogger()) {
+ v8::Handle<v8::Value> loggerArg[] = { jsValue };
+ contextData->activityLogger()->log("{{interface_name}}.{{attribute.name}}", 1, &loggerArg[0], "Setter");
+ }
+ {% endif %}
{% if attribute.has_custom_setter %}
{{v8_class_name}}::{{attribute.name}}AttributeSetterCustom(name, jsValue, info);
{% else %}
« no previous file with comments | « Source/bindings/scripts/unstable/v8_utilities.py ('k') | Source/bindings/templates/interface_base.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698