mojo-js: Fix encoding and decoding of optional unions
Previously we assumed nullable unions were always encoded as/decoded from pointers, but unions are only encoded as/decoded from pointers when they are nested in another union. This CL changes encodeUnion/decodeUnion to use encodeUnionAsPointer() and decodeUnionFromPointer() when a union field is another union. Fixed: 1101849 Change-Id: I7615207fe4052eadb544749fe89225c37d52fa58 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2325458Reviewed-by:Dominick Ng <dominickn@chromium.org> Reviewed-by:
Peter Beverloo <peter@chromium.org> Reviewed-by:
Ken Rockot <rockot@google.com> Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org> Cr-Commit-Position: refs/heads/master@{#794363}
Showing
Please register or sign in to comment