New issue
Advanced search Search tips

Issue 904861 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 15
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

mojom-lite JS bindings may serialize struct fields in wrong order

Project Member Reported by rockot@google.com, Nov 13

Issue description

They should use the ordinal ordering.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f209969571d32c3e234c74b84d4d6a2359ec7f5c

commit f209969571d32c3e234c74b84d4d6a2359ec7f5c
Author: Ken Rockot <rockot@chromium.org>
Date: Wed Nov 14 15:10:21 2018

[mojo-bindings] Fix JS lite serialization

Fixes mojom JS lite serialization in cases where fields are
intentionally packed out of order.

This actually simplifies the serialization and deserialization logic
significantly by leveraging precomputed byte/bit offset values from
the bindings generator and preallocating the entire message buffer
prior to serialization.

It also is now correct instead of incorrect, which is nice.

Bug:  904861 
Change-Id: If08c301303004d164f4a0afcc3085dac86ca3089
Reviewed-on: https://chromium-review.googlesource.com/c/1335269
Reviewed-by: calamity <calamity@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/master@{#607980}
[modify] https://crrev.com/f209969571d32c3e234c74b84d4d6a2359ec7f5c/mojo/public/js/bindings_lite.js
[modify] https://crrev.com/f209969571d32c3e234c74b84d4d6a2359ec7f5c/mojo/public/tools/bindings/generators/js_templates/lite/struct_definition.tmpl

Status: Fixed (was: Assigned)

Sign in to add a comment