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

Unified Diff: third_party/mojo/src/mojo/public/python/mojo_bindings/serialization.py

Issue 954643002: Update mojo sdk to rev 3d23dae011859a2aae49f1d1adde705c8e85d819 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use run_renderer_in_process() 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/python/mojo_bindings/serialization.py
diff --git a/third_party/mojo/src/mojo/public/python/mojo_bindings/serialization.py b/third_party/mojo/src/mojo/public/python/mojo_bindings/serialization.py
index b5ea1bd8a9f3d2e420c3c3db023d4889fd441cb6..8f5cc67b515a7451466748e30889b3676faa337c 100644
--- a/third_party/mojo/src/mojo/public/python/mojo_bindings/serialization.py
+++ b/third_party/mojo/src/mojo/public/python/mojo_bindings/serialization.py
@@ -168,11 +168,14 @@ def NeededPaddingForAlignment(value, alignment=8):
def _GetVersion(groups):
- return sum([len(x.descriptors) for x in groups])
+ if not len(groups):
+ return 0
+ return max([x.GetMaxVersion() for x in groups])
def _FilterGroups(groups, version):
- return [group for group in groups if group.GetVersion() < version]
+ return [group.Filter(version) for
+ group in groups if group.GetMinVersion() <= version]
def _GetStruct(groups):

Powered by Google App Engine
This is Rietveld 408576698