summaryrefslogtreecommitdiff
path: root/node.gyp
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2020-06-06 16:11:31 +0200
committerShelley Vohr <shelley.vohr@gmail.com>2020-06-30 09:34:20 -0700
commitc28726b3f3aa19d02b6278a428633cc1b2393d00 (patch)
tree0aa2e1b3f5af262ba08fe34cf80051956ff6111b /node.gyp
parent8be7c37efb0d71b9f8dc7ac734d39962739d401a (diff)
downloadnode-new-c28726b3f3aa19d02b6278a428633cc1b2393d00.tar.gz
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 Backport-PR-URL: https://github.com/nodejs/node/pull/33965 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'node.gyp')
-rw-r--r--node.gyp1
1 files changed, 1 insertions, 0 deletions
diff --git a/node.gyp b/node.gyp
index c870f8cacf..ba03fef4fb 100644
--- a/node.gyp
+++ b/node.gyp
@@ -218,6 +218,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',