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

Unified Diff: mojo/public/bindings/generators/js_templates/module.js.tmpl

Issue 164873002: Fix bug with using enums as default values in mojom. We were previously (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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: mojo/public/bindings/generators/js_templates/module.js.tmpl
diff --git a/mojo/public/bindings/generators/js_templates/module.js.tmpl b/mojo/public/bindings/generators/js_templates/module.js.tmpl
index 2fb3c0e70629a0bf4a04d3fd5a328da169fe8a13..3bce1179ea2658713d8a9d1a80cd3322d541c089 100644
--- a/mojo/public/bindings/generators/js_templates/module.js.tmpl
+++ b/mojo/public/bindings/generators/js_templates/module.js.tmpl
@@ -15,14 +15,14 @@ define([
) {
{#--- Enums #}
-{%- from "enum_definition.tmpl" import enum_def -%}
+{% from "enum_definition.tmpl" import enum_def -%}
{% for enum in enums %}
-{{ enum_def("var %s"|format(enum.name), enum) }}
+ var {{ enum_def(enum.name, enum, module) }}
{%- endfor %}
{#--- Struct definitions #}
{% for struct in structs %}
-{% include "struct_definition.tmpl" %}
+{%- include "struct_definition.tmpl" %}
{%- endfor %}
{#--- Interface definitions #}

Powered by Google App Engine
This is Rietveld 408576698