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 |