v8/include
mtrofin 99743ad460 [wasm] Transferrable modules
We want to restrict structured cloning in Chrome to:
- postMessage senders and receivers that are co-located
in the same process
- indexedDB (just https).

For context, on the Chrome side, we will achieve the postMessage part
by using a mechanism similar to transferrables: the
SerializedScriptValue will have a list of wasm modules, separate from
the serialized data stream; and this list won't be copied cross
process boundaries. The IDB part is achieved by explicitly opting in
reading/writing to the serialization stream. To block attack vectors
in IPC cases, the default for deserialization will be to expect data
in the wasm transfers list.

This change is the V8 side necessary to enabling this design. We
introduce TransferrableModule, an opaque datatype exposed to the
embedder. Internally, TransferrableModules are just serialized data,
because we don't have a better mechanism, at the moment, for
de-contextualizing/re-contextualizing wasm modules (wrt Isolate and
Context).

The chrome defaults will be implemented in the
serialization/deserialization delegates on that side. For the v8 side
of things, in the absence of a serialization delegate, the V8
serializer will write to serialization stream. In the absence of a
deserialization delegate, the deserializer won't work. This asymmetry
is intentional - it communicates to the embedder the need to make a
policy decision, otherwise wasm serialization/deserialization won't
work "out of the box".

BUG=v8:6079

Review-Url: https://codereview.chromium.org/2748473004
Cr-Commit-Position: refs/heads/master@{#43955}
2017-03-20 19:03:23 +00:00
..
libplatform Make idle tasks optional in the default platform. 2017-03-07 13:37:41 +00:00
DEPS [inspector] Build inspector under v8_enable_inspector build flag. 2016-09-06 23:26:35 +00:00
OWNERS [inspector] Build inspector under v8_enable_inspector build flag. 2016-09-06 23:26:35 +00:00
v8-debug.h [debugger,api] deprecate everything in v8-debug.h 2017-03-10 07:06:25 +00:00
v8-inspector-protocol.h [inspector] Build inspector under v8_enable_inspector build flag. 2016-09-06 23:26:35 +00:00
v8-inspector.h [inspector] exposed ExecutionContextId getter by context 2017-02-11 02:42:17 +00:00
v8-platform.h Enable the embedder to provide stack trace printing 2017-03-17 12:07:25 +00:00
v8-profiler.h Remove object grouping 2017-03-02 17:53:07 +00:00
v8-testing.h Remove easy to remove calls to Isolate::Current() from api.cc 2015-11-30 08:16:59 +00:00
v8-util.h Don't use DCHECK in v8-util.h. 2017-02-27 16:05:46 +00:00
v8-version-string.h Revert of [build] Introduce an embedder version string (patchset #3 id:40001 of https://codereview.chromium.org/2619213002/ ) 2017-01-21 22:36:54 +00:00
v8-version.h Update V8 version to 5.9 2017-03-02 11:09:43 +00:00
v8.h [wasm] Transferrable modules 2017-03-20 19:03:23 +00:00
v8config.h Remove NaCl support. 2016-07-27 07:50:31 +00:00