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.
Review URL: https://codereview.chromium.org/1867483002
Cr-Commit-Position: refs/heads/master@{#385589}
CrOS-Libchrome-Original-Commit: 1953e4dd01ffe90142c2b0ff810c661f4bdbc1f6
6 files changed