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

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

Issue 1515423002: [mojo] Add mojom parser support for native-only structs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pickle2
Patch Set: Created 5 years 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/generators/mojom_java_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_java_generator.py b/mojo/public/tools/bindings/generators/mojom_java_generator.py
index c091a5ffe579a712540853f4885725168b05c6ae..36110d47208673e6f0011c2e155bbc883daa52ed 100644
--- a/mojo/public/tools/bindings/generators/mojom_java_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_java_generator.py
@@ -480,7 +480,8 @@ class Generator(generator.Generator):
# Keep this above the others as .GetStructs() changes the state of the
# module, annotating structs with required information.
- for struct in self.GetStructs():
+ for struct in filter(lambda struct: not struct.native_only,
+ self.GetStructs()):
self.Write(self.GenerateStructSource(struct),
'%s.java' % GetNameForElement(struct))

Powered by Google App Engine
This is Rietveld 408576698