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

Unified Diff: third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl

Issue 2452403002: [Bindings] Reformat template files (4/4) (Closed)
Patch Set: Rebase Created 4 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: third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl
diff --git a/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl
index 2632f5c7335f0e6f9d6d08cec5354a34744c2f18..d96078d83be96bf191c14d7fb24134a736124a53 100644
--- a/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl
@@ -1,20 +1,19 @@
{##############################################################################}
{% macro constant_getter_callback(constant) %}
-void {{constant.name}}ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info)
-{
- {% if constant.deprecate_as %}
- Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{constant.deprecate_as}});
- {% endif %}
- {% if constant.measure_as %}
- UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{constant.measure_as('ConstantGetter')}});
- {% endif %}
- {% if constant.idl_type in ('Double', 'Float') %}
- v8SetReturnValue(info, {{constant.value}});
- {% elif constant.idl_type == 'String' %}
- v8SetReturnValueString(info, "{{constant.value}}");
- {% else %}
- v8SetReturnValueInt(info, {{constant.value}});
- {% endif %}
+void {{constant.name}}ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) {
+ {% if constant.deprecate_as %}
+ Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{constant.deprecate_as}});
+ {% endif %}
+ {% if constant.measure_as %}
+ UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{constant.measure_as('ConstantGetter')}});
+ {% endif %}
+ {% if constant.idl_type in ('Double', 'Float') %}
+ v8SetReturnValue(info, {{constant.value}});
+ {% elif constant.idl_type == 'String' %}
+ v8SetReturnValueString(info, "{{constant.value}}");
+ {% else %}
+ v8SetReturnValueInt(info, {{constant.value}});
+ {% endif %}
}
{% endmacro %}

Powered by Google App Engine
This is Rietveld 408576698