diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-06-06 17:11:31 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2020-06-14 15:53:39 +0300 |
commit | 9129cf21ab51432675521ea158191ae3f866cafb (patch) | |
tree | a495ade59782e28a4ba94ddee085349e083cdd09 /node.gyp | |
parent | 8ead0211d7ee534015a10cc99c01a14cc38cbd3a (diff) |
worker: allow passing JS wrapper objects via postMessage
Enable JS wrapper objects to be used as transferable or cloneable
objects in `postMessage()` calls, by having them extend a C++-backed
class.
This requires a few internal changes:
- This commit adds the possibility for transferred objects to
read/write JS values at the end of the serialization/deserialization
phases.
- This commit adds the possibility for transferred objects to list
sub-transferables, e.g. typically the public JS wrapper class
would list its C++ handle in there.
- This commit adds usage of `BaseObject` in a few more places, because
now during deserialization weakly held objects can also be involved,
in addition to `MessagePort`s.
PR-URL: https://github.com/nodejs/node/pull/33772
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'node.gyp')
-rw-r--r-- | node.gyp | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -220,6 +220,7 @@ 'lib/internal/vm/module.js', 'lib/internal/worker.js', 'lib/internal/worker/io.js', + 'lib/internal/worker/js_transferable.js', 'lib/internal/watchdog.js', 'lib/internal/streams/lazy_transform.js', 'lib/internal/streams/async_iterator.js', |