[wasm] Fix wasm_downgrade_test
The wasm_downgrade_test uses special testing functions which allow to serialize and deserialize a WebAssembly module. The deserialization function takes a DOMArrayBuffer as parameter, converts it into a String, and then uses the String to create a SerializedScriptValue. However, if the length of the DOMArrayBuffer is not even, one byte gets lost in the conversion to a String. With this CL we create the SerializedScriptValue directly from the DOMArrayBuffer, and thereby guarantee that all bytes from the DOMArrayBuffer are copied into the SerializedScriptValue. The bug caused by the conversion to a String was hiding another bug which I'm currently fixing in V8. As soon as the fix in V8 rolled to Chrome, we can continue with this CL. R=binji@chromium.org, pkasting@chromium.org Change-Id: I65b35676b764cd3d64c437b331510897b032b33b Reviewed-on: https://chromium-review.googlesource.com/1006962Reviewed-by:Jeremy Roman <jbroman@chromium.org> Reviewed-by:
Ben Smith <binji@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#551002}
Showing
Please register or sign in to comment