diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-05-13 20:39:32 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-06-06 20:43:46 +0300 |
commit | b0404047c1e4f7652aaf6ecf911d5850d5acf570 (patch) | |
tree | f8e09cfda61b24d4c548e6d9ab560bfaa5d3a03a /src/node_errors.h | |
parent | 749a13b76c351d515ed489844ece575b8918d2ed (diff) |
worker: add `SharedArrayBuffer` sharing
Logic is added to the `MessagePort` mechanism that
attaches hidden objects to those instances when they are transferred
that track their lifetime and maintain a reference count, to make
sure that memory is freed at the appropriate times.
Thanks to Stephen Belanger for reviewing this change in its original PR.
Refs: https://github.com/ayojs/ayo/pull/106
PR-URL: https://github.com/nodejs/node/pull/20876
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Diffstat (limited to 'src/node_errors.h')
-rw-r--r-- | src/node_errors.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/node_errors.h b/src/node_errors.h index 9cadb0e1853..931ce7b8fdb 100644 --- a/src/node_errors.h +++ b/src/node_errors.h @@ -37,6 +37,7 @@ namespace node { V(ERR_SCRIPT_EXECUTION_INTERRUPTED, Error) \ V(ERR_SCRIPT_EXECUTION_TIMEOUT, Error) \ V(ERR_STRING_TOO_LONG, Error) \ + V(ERR_TRANSFERRING_EXTERNALIZED_SHAREDARRAYBUFFER, TypeError) \ #define V(code, type) \ inline v8::Local<v8::Value> code(v8::Isolate* isolate, \ @@ -68,7 +69,9 @@ namespace node { V(ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST, \ "MessagePort was found in message but not listed in transferList") \ V(ERR_SCRIPT_EXECUTION_INTERRUPTED, \ - "Script execution was interrupted by `SIGINT`") + "Script execution was interrupted by `SIGINT`") \ + V(ERR_TRANSFERRING_EXTERNALIZED_SHAREDARRAYBUFFER, \ + "Cannot serialize externalized SharedArrayBuffer") \ #define V(code, message) \ inline v8::Local<v8::Value> code(v8::Isolate* isolate) { \ |