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

Unified Diff: mojo/public/tools/bindings/generators/mojom_js_generator.py

Issue 2427323004: Mojo JS bindings: Fix codec names for nested enum definitions (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/generators/mojom_js_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_js_generator.py b/mojo/public/tools/bindings/generators/mojom_js_generator.py
index 3900e50d3fd12119d795b785335b4a8b9766d17c..e57f3305eba98e4ad4042da2320d4bd4e62ad190 100644
--- a/mojo/public/tools/bindings/generators/mojom_js_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_js_generator.py
@@ -133,8 +133,7 @@ def CodecType(kind):
if mojom.IsAssociatedInterfaceRequestKind(kind):
return "codec.AssociatedInterfaceRequestNotSupported"
if mojom.IsEnumKind(kind):
- element_type = kind.name
- return "new codec.Enum(%s)" % (element_type)
+ return "new codec.Enum(%s)" % JavaScriptType(kind)
if mojom.IsMapKind(kind):
map_type = "NullableMapOf" if mojom.IsNullableKind(kind) else "MapOf"
key_type = ElementCodecType(kind.key_kind)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698