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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
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}}(v8::Local<v8::Stri ng> name, const v8::PropertyCallbackInfo<v8::Value>& info) 4 static void {{attribute.name}}AttributeGetter{{world_suffix}}(v8::Local<v8::Stri ng> name, const v8::PropertyCallbackInfo<v8::Value>& info)
5 { 5 {
6 {% if attribute.is_unforgeable %} 6 {% if attribute.is_unforgeable %}
7 v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain({{ v8_class_name}}::GetTemplate(info.GetIsolate(), worldType(info.GetIsolate()))); 7 v8::Handle<v8::Object> holder = info.This()->FindInstanceInPrototypeChain({{ v8_class_name}}::GetTemplate(info.GetIsolate(), worldType(info.GetIsolate())));
8 if (holder.IsEmpty()) 8 if (holder.IsEmpty())
9 return; 9 return;
10 {{cpp_class_name}}* imp = {{v8_class_name}}::toNative(holder); 10 {{cpp_class_name}}* imp = {{v8_class_name}}::toNative(holder);
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 {% endfilter %} 128 {% endfilter %}
129 {% endmacro %} 129 {% endmacro %}
130 130
131 131
132 {##############################################################################} 132 {##############################################################################}
133 {% macro attribute_setter_callback(attribute, world_suffix) %} 133 {% macro attribute_setter_callback(attribute, world_suffix) %}
134 {% filter conditional(attribute.conditional_string) %} 134 {% filter conditional(attribute.conditional_string) %}
135 static void {{attribute.name}}AttributeSetterCallback{{world_suffix}}(v8::Local< v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v oid>& info) 135 static void {{attribute.name}}AttributeSetterCallback{{world_suffix}}(v8::Local< v8::String> name, v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<v oid>& info)
136 { 136 {
137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 137 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
138 {% if world_suffix in attribute.activity_logging_setter %}
139 V8PerContextData* contextData = V8PerContextData::from(info.GetIsolate()->Ge tCurrentContext());
140 if (contextData && contextData->activityLogger()) {
141 v8::Handle<v8::Value> loggerArg[] = { jsValue };
142 contextData->activityLogger()->log("{{interface_name}}.{{attribute.name} }", 1, &loggerArg[0], "Setter");
143 }
144 {% endif %}
138 {% if attribute.has_custom_setter %} 145 {% if attribute.has_custom_setter %}
139 {{v8_class_name}}::{{attribute.name}}AttributeSetterCustom(name, jsValue, in fo); 146 {{v8_class_name}}::{{attribute.name}}AttributeSetterCustom(name, jsValue, in fo);
140 {% else %} 147 {% else %}
141 {{cpp_class_name}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffi x}}(name, jsValue, info); 148 {{cpp_class_name}}V8Internal::{{attribute.name}}AttributeSetter{{world_suffi x}}(name, jsValue, info);
142 {% endif %} 149 {% endif %}
143 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 150 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
144 } 151 }
145 {% endfilter %} 152 {% endfilter %}
146 {% endmacro %} 153 {% endmacro %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698