• Ken Rockot's avatar
    [mojo-bindings] Fix JS lite serialization · f2099695
    Ken Rockot authored
    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/1335269Reviewed-by: default avatarcalamity <calamity@chromium.org>
    Commit-Queue: Ken Rockot <rockot@google.com>
    Cr-Commit-Position: refs/heads/master@{#607980}
    f2099695
bindings_lite.js 49.2 KB