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

Unified Diff: Source/bindings/templates/constants.cpp

Issue 1315663004: [bindings] Bindings should only support the prescribed types for constants. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/bindings/core/v8/V8DOMConfiguration.cpp ('k') | Source/bindings/tests/idls/core/TestObject.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/templates/constants.cpp
diff --git a/Source/bindings/templates/constants.cpp b/Source/bindings/templates/constants.cpp
index b88c373a8e0f2b0b03028df38dce0a9f5aa47d4e..d867b2c8ea3dc982b3f398de6729bc6d75fc9e05 100644
--- a/Source/bindings/templates/constants.cpp
+++ b/Source/bindings/templates/constants.cpp
@@ -60,12 +60,10 @@ static_assert({{constant.value}} == {{constant_cpp_class}}::{{constant.reflected
{######################################}
{%- macro constant_configuration(constant) %}
{% if constant.idl_type in ('Double', 'Float') %}
- {% set value = '0, %s, 0' % constant.value %}
-{% elif constant.idl_type == 'String' %}
- {% set value = '0, 0, "%s"' % constant.value %}
+ {% set value = '0, %s' % constant.value %}
{% else %}
{# 'Short', 'Long' etc. #}
- {% set value = '%s, 0, 0' % constant.value %}
+ {% set value = '%s, 0' % constant.value %}
{% endif %}
{"{{constant.name}}", {{value}}, V8DOMConfiguration::ConstantType{{constant.idl_type}}}
{%- endmacro %}
« no previous file with comments | « Source/bindings/core/v8/V8DOMConfiguration.cpp ('k') | Source/bindings/tests/idls/core/TestObject.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698