Mojo Bindings: Single-phase serialization

Desktop / Chromium - Ken Rockot [chromium.org] - 10 August 2017 12:29 EDT

Eliminates the handle-collection phase of serialization in C++ bindings.

BUG=752631

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

fda282af Mojo Bindings: Single-phase serialization
mojo/public/cpp/bindings/lib/array_serialization.h | 47 ----------
mojo/public/cpp/bindings/lib/buffer.cc | 16 ++++
mojo/public/cpp/bindings/lib/buffer.h | 7 ++
.../bindings/lib/handle_interface_serialization.h | 57 +++----------
mojo/public/cpp/bindings/lib/map_serialization.h | 11 ---
mojo/public/cpp/bindings/lib/message.cc | 61 +++++++++----
.../bindings/lib/native_struct_serialization.cc | 5 --
.../cpp/bindings/lib/native_struct_serialization.h | 5 --
mojo/public/cpp/bindings/lib/serialization.h | 5 +-
.../cpp/bindings/lib/serialization_context.cc | 92 ++++----------------
.../cpp/bindings/lib/serialization_context.h | 99 ++++------------------
.../cpp/bindings/lib/serialization_forward.h | 26 ------
mojo/public/cpp/bindings/lib/serialization_util.h | 20 -----
.../public/cpp/bindings/lib/string_serialization.h | 3 -
.../bindings/lib/unserialized_message_context.cc | 25 ------
.../bindings/lib/unserialized_message_context.h | 16 ----
mojo/public/cpp/bindings/message.h | 5 ++
.../cpp/bindings/tests/data_view_unittest.cc | 2 -
.../tests/serialization_warning_unittest.cc | 3 -
mojo/public/cpp/bindings/tests/struct_unittest.cc | 1 -
mojo/public/cpp/bindings/tests/union_unittest.cc | 6 --
.../cpp/bindings/tests/wtf_types_unittest.cc | 2 -
.../cpp_templates/interface_definition.tmpl | 9 +-
.../generators/cpp_templates/interface_macros.tmpl | 23 ++---
.../generators/cpp_templates/struct_macros.tmpl | 47 ----------
.../struct_serialization_declaration.tmpl | 29 -------
.../union_serialization_declaration.tmpl | 52 ------------
.../bindings/generators/mojom_cpp_generator.py | 2 +
28 files changed, 133 insertions(+), 543 deletions(-)

Upstream: git.chromium.org


  • Share