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

Unified Diff: sky/engine/bindings/templates/constants.cpp

Issue 922053002: Remove unused V8 integration code in Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: sky/engine/bindings/templates/constants.cpp
diff --git a/sky/engine/bindings/templates/constants.cpp b/sky/engine/bindings/templates/constants.cpp
deleted file mode 100644
index d916167d5d9a7cd585edda62dedb0eb863458faf..0000000000000000000000000000000000000000
--- a/sky/engine/bindings/templates/constants.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-{######################################}
-{% macro install_constants() %}
-{% if has_constant_configuration %}
-{# Normal constants #}
-static const V8DOMConfiguration::ConstantConfiguration {{v8_class}}Constants[] = {
- {% for constant in constants if not constant.runtime_enabled_function %}
- {% 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 %}
- {% else %}
- {# 'Short', 'Long' etc. #}
- {% set value = '%s, 0, 0' % constant.value %}
- {% endif %}
- {"{{constant.name}}", {{value}}, V8DOMConfiguration::ConstantType{{constant.idl_type}}},
- {% endfor %}
-};
-V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, {{v8_class}}Constants, WTF_ARRAY_LENGTH({{v8_class}}Constants), isolate);
-{% endif %}
-{# Runtime-enabled constants #}
-{% for constant in constants if constant.runtime_enabled_function %}
-if ({{constant.runtime_enabled_function}}()) {
- {% 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 %}
- {% else %}
- {# 'Short', 'Long' etc. #}
- {% set value = '%s, 0, 0' % constant.value %}
- {% endif %}
- static const V8DOMConfiguration::ConstantConfiguration constantConfiguration = {"{{constant.name}}", {{value}}, V8DOMConfiguration::ConstantType{{constant.idl_type}}};
- V8DOMConfiguration::installConstants(functionTemplate, prototypeTemplate, &constantConfiguration, 1, isolate);
-}
-{% endfor %}
-{# Check constants #}
-{% if not do_not_check_constants %}
-{% for constant in constants %}
-{% if constant.idl_type not in ('Double', 'Float', 'String') %}
-{% set constant_cpp_class = constant.cpp_class or cpp_class %}
-COMPILE_ASSERT({{constant.value}} == {{constant_cpp_class}}::{{constant.reflected_name}}, TheValueOf{{cpp_class}}_{{constant.reflected_name}}DoesntMatchWithImplementation);
-{% endif %}
-{% endfor %}
-{% endif %}
-{% endmacro %}
« no previous file with comments | « sky/engine/bindings/templates/callback_interface.cpp ('k') | sky/engine/bindings/templates/dictionary_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698