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

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

Issue 890843003: Revert of Update mojo sdk to rev 8af2ccff2eee4bfca1043015abee30482a030b30 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom/generate/module.py
diff --git a/third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom/generate/module.py b/third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom/generate/module.py
index c2e59a690048b8ccadf093572e4b72503b057e26..8a0f56ba55a9b52345db3386a0ce23e287a38668 100644
--- a/third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom/generate/module.py
+++ b/third_party/mojo/src/mojo/public/tools/bindings/pylib/mojom/generate/module.py
@@ -171,11 +171,10 @@
class Constant(object):
- def __init__(self, name=None, kind=None, value=None, parent_kind=None):
+ def __init__(self, name=None, kind=None, value=None):
self.name = name
self.kind = kind
self.value = value
- self.parent_kind = parent_kind
class Field(object):
@@ -465,10 +464,6 @@
return isinstance(kind, Struct)
-def IsUnionKind(kind):
- return isinstance(kind, Union)
-
-
def IsArrayKind(kind):
return isinstance(kind, Array)
@@ -499,7 +494,7 @@
def IsObjectKind(kind):
return (IsStructKind(kind) or IsArrayKind(kind) or IsStringKind(kind) or
- IsMapKind(kind) or IsUnionKind(kind))
+ IsMapKind(kind))
def IsNonInterfaceHandleKind(kind):
@@ -517,8 +512,7 @@
def IsMoveOnlyKind(kind):
- return (not IsStringKind(kind) and IsObjectKind(kind)) or \
- IsAnyHandleKind(kind)
+ return IsObjectKind(kind) or IsAnyHandleKind(kind)
def IsCloneableKind(kind):
@@ -531,7 +525,7 @@
return True
if IsArrayKind(kind):
return ContainsHandles(kind.kind, visited_kinds)
- if IsStructKind(kind) or IsUnionKind(kind):
+ if IsStructKind(kind):
for field in kind.fields:
if ContainsHandles(field.kind, visited_kinds):
return True

Powered by Google App Engine
This is Rietveld 408576698