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

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: 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
Index: Source/bindings/templates/attributes.cpp
diff --git a/Source/bindings/templates/attributes.cpp b/Source/bindings/templates/attributes.cpp
index 245d3ab4941e89d869ee8a2de32cd54a6b1cd744..22591e99c09d7afc304e3a32fe72f4a4150667ab 100644
--- a/Source/bindings/templates/attributes.cpp
+++ b/Source/bindings/templates/attributes.cpp
@@ -135,6 +135,13 @@ static void {{attribute.name}}AttributeSetter{{world_suffix}}(v8::Local<v8::Stri
static void {{attribute.name}}AttributeSetterCallback{{world_suffix}}(v8::Local<v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
+ {% if world_suffix in attribute.activity_logging_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 %}

Powered by Google App Engine
This is Rietveld 408576698