Mojo: Support dynamic message growth

Desktop / Chromium - Ken Rockot [chromium.org] - 17 July 2017 18:35 EDT

Reworks the system messaging APIs to give consumers direct control over serialized message attachments and replaces MojoMessageOperationThunks with a simpler pair of functions (serialize and destroy). Introduces new C API calls: MojoAttachSerializedMessageBuffer, MojoExtendSerializedMessagePayload, and MojoAttachMessageContext.

Existing usage of the messaging APIs has been adapted to the new API surface as a precursor to using dynamically-grown messages during bindings serialization.

BUG=742369

Change-Id: Ib3938b2d46a856e0c58b1fb89be78229bc469404 Reviewed-on: https://chromium-review.googlesource.com/571272 Commit-Queue: Ken Rockot

559b70d Mojo: Support dynamic message growth
mojo/edk/embedder/entrypoints.cc | 35 ++-
mojo/edk/system/channel.cc | 53 ++++-
mojo/edk/system/channel.h | 29 ++-
mojo/edk/system/core.cc | 70 ++++--
mojo/edk/system/core.h | 18 +-
mojo/edk/system/core_unittest.cc | 43 ++--
mojo/edk/system/message_unittest.cc | 261 +++++++++++++++++++--
mojo/edk/system/node_channel.cc | 18 +-
mojo/edk/system/node_channel.h | 3 +-
mojo/edk/system/node_controller.cc | 4 +-
mojo/edk/system/user_message_impl.cc | 144 ++++++++----
mojo/edk/system/user_message_impl.h | 26 +-
mojo/public/c/system/README.md | 148 +++++++-----
mojo/public/c/system/message_pipe.h | 232 +++++++++++-------
mojo/public/c/system/tests/core_unittest.cc | 6 +-
mojo/public/c/system/tests/core_unittest_pure_c.c | 3 +-
mojo/public/c/system/thunks.cc | 35 ++-
mojo/public/c/system/thunks.h | 18 +-
mojo/public/cpp/bindings/lib/message.cc | 142 +++++------
.../cpp/bindings/tests/validation_unittest.cc | 30 +--
mojo/public/cpp/system/message.h | 6 +-
mojo/public/cpp/system/message_pipe.cc | 77 +-----
22 files changed, 925 insertions(+), 476 deletions(-)

Upstream: git.chromium.org


  • Share