Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2020-06-06 17:11:31 +0300
committerAnna Henningsen <anna@addaleax.net>2020-06-14 15:53:39 +0300
commit9129cf21ab51432675521ea158191ae3f866cafb (patch)
treea495ade59782e28a4ba94ddee085349e083cdd09 /src/node_errors.h
parent8ead0211d7ee534015a10cc99c01a14cc38cbd3a (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 'src/node_errors.h')
-rw-r--r--src/node_errors.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/node_errors.h b/src/node_errors.h
index 01a8d8e75ac..d61c268dea9 100644
--- a/src/node_errors.h
+++ b/src/node_errors.h
@@ -93,7 +93,8 @@ void OnFatalError(const char* location, const char* message);
V(ERR_MEMORY_ALLOCATION_FAILED, "Failed to allocate memory") \
V(ERR_OSSL_EVP_INVALID_DIGEST, "Invalid digest used") \
V(ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST, \
- "MessagePort was found in message but not listed in transferList") \
+ "Object that needs transfer was found in message but not listed " \
+ "in transferList") \
V(ERR_MISSING_PLATFORM_FOR_WORKER, \
"The V8 platform used by this instance of Node does not support " \
"creating Workers") \