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

Side by Side Diff: third_party/WebKit/Source/bindings/templates/interface_base.cpp

Issue 1678003002: Remove sampling trace events from the binding layer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 {% include 'copyright_block.txt' %} 1 {% include 'copyright_block.txt' %}
2 #include "{{v8_class_or_partial}}.h" 2 #include "{{v8_class_or_partial}}.h"
3 3
4 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %} 4 {% for filename in cpp_includes if filename != '%s.h' % cpp_class_or_partial %}
5 #include "{{filename}}" 5 #include "{{filename}}"
6 {% endfor %} 6 {% endfor %}
7 7
8 namespace blink { 8 namespace blink {
9 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class 9 {% set to_active_dom_object = '%s::toActiveDOMObject' % v8_class
10 if is_active_dom_object else '0' %} 10 if is_active_dom_object else '0' %}
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 return false; 66 return false;
67 } 67 }
68 {% endif %} 68 {% endif %}
69 ASSERT(info.This()->IsObject()); 69 ASSERT(info.This()->IsObject());
70 return v8CallBoolean(v8::Local<v8::Object>::Cast(info.This())->CreateDataPro perty(info.GetIsolate()->GetCurrentContext(), name, v8Value)); 70 return v8CallBoolean(v8::Local<v8::Object>::Cast(info.This())->CreateDataPro perty(info.GetIsolate()->GetCurrentContext(), name, v8Value));
71 } 71 }
72 72
73 {% if needs_constructor_setter_callback %} 73 {% if needs_constructor_setter_callback %}
74 static void {{cpp_class}}ConstructorAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 74 static void {{cpp_class}}ConstructorAttributeSetterCallback(v8::Local<v8::Name>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
75 { 75 {
76 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
77 do { 76 do {
78 v8::Local<v8::Value> data = info.Data(); 77 v8::Local<v8::Value> data = info.Data();
79 ASSERT(data->IsExternal()); 78 ASSERT(data->IsExternal());
80 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()- >CreationContext()); 79 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()- >CreationContext());
81 if (!perContextData) 80 if (!perContextData)
82 break; 81 break;
83 const WrapperTypeInfo* wrapperTypeInfo = WrapperTypeInfo::unwrap(data); 82 const WrapperTypeInfo* wrapperTypeInfo = WrapperTypeInfo::unwrap(data);
84 if (!wrapperTypeInfo) 83 if (!wrapperTypeInfo)
85 break; 84 break;
86 {{cpp_class}}CreateDataProperty(v8String(info.GetIsolate(), wrapperTypeI nfo->interfaceName), v8Value, info); 85 {{cpp_class}}CreateDataProperty(v8String(info.GetIsolate(), wrapperTypeI nfo->interfaceName), v8Value, info);
87 } while (false); // do ... while (false) just for use of break 86 } while (false); // do ... while (false) just for use of break
88 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
89 } 87 }
90 88
91 {% endif %} 89 {% endif %}
92 {% endif %} 90 {% endif %}
93 {% endblock %} 91 {% endblock %}
94 {##############################################################################} 92 {##############################################################################}
95 {% from 'attributes.cpp' import constructor_getter_callback, 93 {% from 'attributes.cpp' import constructor_getter_callback,
96 attribute_getter, attribute_getter_callback, 94 attribute_getter, attribute_getter_callback,
97 attribute_setter, attribute_setter_callback, 95 attribute_setter, attribute_setter_callback,
98 attribute_getter_implemented_in_private_script, 96 attribute_getter_implemented_in_private_script,
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 {{method_implemented_in_private_script(method)}} 443 {{method_implemented_in_private_script(method)}}
446 {% endfor %} 444 {% endfor %}
447 {% for attribute in attributes if attribute.is_implemented_in_private_script %} 445 {% for attribute in attributes if attribute.is_implemented_in_private_script %}
448 {{attribute_getter_implemented_in_private_script(attribute)}} 446 {{attribute_getter_implemented_in_private_script(attribute)}}
449 {% if attribute.has_setter %} 447 {% if attribute.has_setter %}
450 {{attribute_setter_implemented_in_private_script(attribute)}} 448 {{attribute_setter_implemented_in_private_script(attribute)}}
451 {% endif %} 449 {% endif %}
452 {% endfor %} 450 {% endfor %}
453 {% block partial_interface %}{% endblock %} 451 {% block partial_interface %}{% endblock %}
454 } // namespace blink 452 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/templates/interface.cpp ('k') | third_party/WebKit/Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698