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

Issue 588493002: mojo: Add deserialization to python structs. (Closed)

Created:
6 years, 3 months ago by qsr
Modified:
6 years, 3 months ago
Reviewers:
Chris Masone, sdefresne
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

mojo: Add deserialization to python structs. This is a reland of https://codereview.chromium.org/578263003 using buffer instead of memoryview, because on some early version of python 2.7, memoryview cannot be used with struct.unpack_from. BUG=415491 R=sdefresne@chromium.org,cmasone@chromium.org Committed: https://crrev.com/37dd5f484593b1c8b92b825a9648edf7fb6944e6 Cr-Commit-Position: refs/heads/master@{#295684}

Patch Set 1 #

Patch Set 2 : Patch on previously landed CL #

Patch Set 3 : Use buffers on native array instead of creating a atring. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -29 lines) Patch
M mojo/public/python/mojo/bindings/descriptor.py View 1 2 18 chunks +132 lines, -19 lines 0 comments Download
M mojo/public/python/mojo/bindings/reflection.py View 1 chunk +8 lines, -0 lines 0 comments Download
M mojo/public/python/mojo/bindings/serialization.py View 1 3 chunks +32 lines, -6 lines 0 comments Download
M mojo/python/tests/bindings_serialization_deserialization_unittest.py View 1 3 chunks +82 lines, -4 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
qsr
The patch 1 is the original CL.
6 years, 3 months ago (2014-09-19 08:29:36 UTC) #1
sdefresne
lgtm
6 years, 3 months ago (2014-09-19 08:32:10 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/588493002/40001
6 years, 3 months ago (2014-09-19 08:55:03 UTC) #4
commit-bot: I haz the power
Committed patchset #3 (id:40001) as 60fe04bc91783a29a4c3337ff79feead85d648e4
6 years, 3 months ago (2014-09-19 09:49:43 UTC) #5
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/37dd5f484593b1c8b92b825a9648edf7fb6944e6 Cr-Commit-Position: refs/heads/master@{#295684}
6 years, 3 months ago (2014-09-19 09:50:27 UTC) #6
vasilii
6 years, 3 months ago (2014-09-19 12:24:29 UTC) #7
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/584003002/ by vasilii@chromium.org.

The reason for reverting is: Linux Tests mojo_python_bindings_tests failure
http://build.chromium.org/p/chromium.linux/builders/Linux%20Tests/builds/13712

======================================================================
ERROR: testDefaultsTestSerializationDeserialization
(bindings_serialization_deserialization_unittest.SerializationDeserializationTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/mnt/data/b/build/slave/Linux_Tests/build/src/mojo/python/tests/bindings_serialization_deserialization_unittest.py",
line 125, in testDefaultsTestSerializationDeserialization
    v2 = sample_service_mojom.DefaultsTest.Deserialize(data, handles)
  File
"/mnt/data/b/build/slave/Linux_Tests/build/src/out/Release/python/mojo/bindings/reflection.py",
line 113, in Deserialize
    serialization_object.Deserialize(fields, data, handles)
  File
"/mnt/data/b/build/slave/Linux_Tests/build/src/out/Release/python/mojo/bindings/serialization.py",
line 82, in Deserialize
    (_, version) = HEADER_STRUCT.unpack_from(data)
TypeError: unpack_from() argument 1 must be string or read-only buffer, not
bytearray.

Powered by Google App Engine
This is Rietveld 408576698