[wasm] enable wasm structured cloning in specific cases
Using the mechanism introduced in V8 with
https://codereview.chromium.org/2748473004, we restrict wasm structured cloning
to:
1) senders and receivers in the same process. This is achieved, similar to shared
array buffers, by defaulting wasm serialization to using a transfer list internal to
SerializedScriptValue. The transfer list is not IPC-ed, which achieves the desired
restriction
2) IndexedDB, when the origin is secure. This is achieved by explicitly opting in, on
both serialization and deserialization side, into inline (i.e. in the stream)
(de)serialization, if the origin is secure. This last check is done on the serialization
side, which should be sufficient, since we trust the IDB layer.
In the process of adding tests for in-process iframe, I found crbug.com/700788. Left
the test in the CL, but currently disabled. Also, didn't add a cross-origin iframe test
because, currently, that wouldn't add value (because of this bug)
BUG=
chromium:703650
Review-Url:
https://codereview.chromium.org/2749503002
Cr-Commit-Position: refs/heads/master@{#460328}
Committed:
https://chromium.googlesource.com/chromium/src/+/110b0ecc2600e97fdc7496fb99fb309cab806242