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

Issue 1867483002: Mojo: Align string sizes when serializing a native type. (Closed)

Created:
4 years, 8 months ago by Sam McNally
Modified:
4 years, 8 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chrome-apps-syd-reviews_chromium.org, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojo: Align string sizes when serializing a native type. When determining the serialized size of a string field of a Mojo struct with a typemapped type, that size is not aligned. When serializing that string, each allocation in the buffer is aligned to 8 bytes. This can result in the buffer requiring a re-allocation to accommodate the actual serialized size and failed DCHECKs. This CL fixes this by aligning each string size. Committed: https://crrev.com/1953e4dd01ffe90142c2b0ff810c661f4bdbc1f6 Cr-Commit-Position: refs/heads/master@{#385589}

Patch Set 1 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -7 lines) Patch
M mojo/mojom_bindings_generator_explicit.gypi View 2 chunks +3 lines, -3 lines 1 comment Download
M mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.h View 1 chunk +4 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/tests/struct_with_traits_impl_traits.cc View 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/interfaces/bindings/tests/struct_with_traits.mojom View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/tools/bindings/bindings.gyp View 1 chunk +8 lines, -0 lines 1 comment Download
M mojo/public/tools/bindings/generators/cpp_templates/struct_serialization_declaration.tmpl View 1 chunk +5 lines, -3 lines 0 comments Download

Messages

Total messages: 14 (9 generated)
Sam McNally
4 years, 8 months ago (2016-04-06 08:12:28 UTC) #7
Ken Rockot(use gerrit already)
lgtm https://codereview.chromium.org/1867483002/diff/80001/mojo/mojom_bindings_generator_explicit.gypi File mojo/mojom_bindings_generator_explicit.gypi (right): https://codereview.chromium.org/1867483002/diff/80001/mojo/mojom_bindings_generator_explicit.gypi#newcode82 mojo/mojom_bindings_generator_explicit.gypi:82: '<(SHARED_INTERMEDIATE_DIR)/mojo/public/tools/bindings/cpp_templates.zip', Heh, this probably explains a weird error ...
4 years, 8 months ago (2016-04-06 14:54:59 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1867483002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1867483002/80001
4 years, 8 months ago (2016-04-06 22:18:19 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:80001)
4 years, 8 months ago (2016-04-06 23:54:35 UTC) #12
commit-bot: I haz the power
4 years, 8 months ago (2016-04-06 23:56:32 UTC) #14
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/1953e4dd01ffe90142c2b0ff810c661f4bdbc1f6
Cr-Commit-Position: refs/heads/master@{#385589}

Powered by Google App Engine
This is Rietveld 408576698