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

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

Issue 2226853002: Mojo C++ bindings: add support for UnionTraits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@85_10_inline_more
Patch Set: . Created 4 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 | « mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl ('k') | 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_cpp_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
index f721102b38c5ad687e37569562c3b08b49472358..fec7a6be233d5109ab91c61e0f2564d77c19faeb 100644
--- a/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_cpp_generator.py
@@ -368,8 +368,8 @@ def TranslateConstants(token, kind):
def ExpressionToText(value, kind=None):
return TranslateConstants(value, kind)
-def RequiresContextForDataView(struct):
- for field in struct.fields:
+def RequiresContextForDataView(kind):
+ for field in kind.fields:
if mojom.IsReferenceKind(field.kind):
return True
return False
« no previous file with comments | « mojo/public/tools/bindings/generators/cpp_templates/wrapper_union_class_definition.tmpl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698