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

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

Issue 1526533002: [mojo] Add pickling support for native-only structs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bindings-4-bool-deserialize
Patch Set: merge 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
« no previous file with comments | « mojo/public/tools/bindings/generators/mojom_cpp_generator.py ('k') | third_party/mojo/mojo_edk_tests.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/pylib/mojom/generate/module.py
diff --git a/mojo/public/tools/bindings/pylib/mojom/generate/module.py b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
index dfde609d5fa9b14ddad9ef88822c05820fe71c92..43476097216f233cec5b0249174f5d618a10ad7b 100644
--- a/mojo/public/tools/bindings/pylib/mojom/generate/module.py
+++ b/mojo/public/tools/bindings/pylib/mojom/generate/module.py
@@ -603,6 +603,8 @@ def IsCloneableKind(kind):
if IsArrayKind(kind):
return _IsCloneable(kind.kind, visited_kinds)
if IsStructKind(kind) or IsUnionKind(kind):
+ if IsStructKind(kind) and kind.native_only:
+ return False
for field in kind.fields:
if not _IsCloneable(field.kind, visited_kinds):
return False
« no previous file with comments | « mojo/public/tools/bindings/generators/mojom_cpp_generator.py ('k') | third_party/mojo/mojo_edk_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698