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

Unified Diff: mojo/public/tools/bindings/pylib/mojom/generate/pack.py

Issue 611633002: mojom: Add associative arrays to the mojom language. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/tools/bindings/pylib/mojom/generate/pack.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/pack.py b/mojo/public/tools/bindings/pylib/mojom/generate/pack.py
index 1d3df435b6cdae506d194f04bf23bbc2926a6518..72eec26ae5b31e5047f745aed5b5ac186f8d94cd 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/pack.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/pack.py
@@ -40,6 +40,8 @@ class PackedField(object):
@classmethod
def GetSizeForKind(cls, kind):
+ if isinstance(kind, mojom.Map):
+ return 16
if isinstance(kind, (mojom.Array, mojom.Struct, mojom.FixedArray)):
return 8
if isinstance(kind, mojom.Interface) or \

Powered by Google App Engine
This is Rietveld 408576698