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

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

Issue 2894063002: Expose UseCounter::Feature enum out of blink as WebFeature (Closed)
Patch Set: Rebase update Created 3 years, 6 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 {% extends 'interface_base.cpp.tmpl' %} 1 {% extends 'interface_base.cpp.tmpl' %}
2 2
3 {##############################################################################} 3 {##############################################################################}
4 {% block indexed_property_getter %} 4 {% block indexed_property_getter %}
5 {% if indexed_property_getter and not indexed_property_getter.is_custom %} 5 {% if indexed_property_getter and not indexed_property_getter.is_custom %}
6 {% set getter = indexed_property_getter %} 6 {% set getter = indexed_property_getter %}
7 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info) { 7 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info) {
8 {% if getter.is_raises_exception %} 8 {% if getter.is_raises_exception %}
9 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kIndexedGette rContext, "{{interface_name}}"); 9 ExceptionState exceptionState(info.GetIsolate(), ExceptionState::kIndexedGette rContext, "{{interface_name}}");
10 {% endif %} 10 {% endif %}
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 625
626 {% endif %} 626 {% endif %}
627 {% endblock %} 627 {% endblock %}
628 628
629 629
630 {##############################################################################} 630 {##############################################################################}
631 {% block constructor_callback %} 631 {% block constructor_callback %}
632 {% if constructors or has_custom_constructor or has_html_constructor %} 632 {% if constructors or has_custom_constructor or has_html_constructor %}
633 void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value> & info) { 633 void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value> & info) {
634 {% if measure_as %} 634 {% if measure_as %}
635 UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), UseCounter::k{{m easure_as('Constructor')}}); 635 UseCounter::Count(CurrentExecutionContext(info.GetIsolate()), WebFeature::k{{m easure_as('Constructor')}});
636 {% endif %} 636 {% endif %}
637 if (!info.IsConstructCall()) { 637 if (!info.IsConstructCall()) {
638 V8ThrowException::ThrowTypeError(info.GetIsolate(), ExceptionMessages::Const ructorNotCallableAsFunction("{{interface_name}}")); 638 V8ThrowException::ThrowTypeError(info.GetIsolate(), ExceptionMessages::Const ructorNotCallableAsFunction("{{interface_name}}"));
639 return; 639 return;
640 } 640 }
641 641
642 if (ConstructorMode::Current(info.GetIsolate()) == ConstructorMode::kWrapExist ingObject) { 642 if (ConstructorMode::Current(info.GetIsolate()) == ConstructorMode::kWrapExist ingObject) {
643 V8SetReturnValue(info, info.Holder()); 643 V8SetReturnValue(info, info.Holder());
644 return; 644 return;
645 } 645 }
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
934 } 934 }
935 935
936 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %} 936 {% for method in methods if method.overloads and method.overloads.has_partial_ov erloads %}
937 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) { 937 void {{v8_class}}::register{{method.name | blink_capitalize}}MethodForPartialInt erface(void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) {
938 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method; 938 {{cpp_class}}V8Internal::{{method.name}}MethodForPartialInterface = method;
939 } 939 }
940 940
941 {% endfor %} 941 {% endfor %}
942 {% endif %} 942 {% endif %}
943 {% endblock %} 943 {% endblock %}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698