diff options
author | Anna Henningsen <anna@addaleax.net> | 2020-06-14 15:50:28 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2020-06-25 03:56:55 +0300 |
commit | 5ef5116311f5e78333dc0dbe378553e64f06cab3 (patch) | |
tree | 7bc433de9208786a96ecc78bdaf017e4e979f30d /src | |
parent | 8e129624019247c2f1474bbe28cbf6863f238446 (diff) |
worker: rename error code to be more accurate
Rename `ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST`
to `ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST` in order to be more
accurate.
PR-URL: https://github.com/nodejs/node/pull/33872
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/node_errors.h | 4 | ||||
-rw-r--r-- | src/node_messaging.cc | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/node_errors.h b/src/node_errors.h index 871071aaa07..f1fa16fa276 100644 --- a/src/node_errors.h +++ b/src/node_errors.h @@ -43,7 +43,7 @@ void OnFatalError(const char* location, const char* message); V(ERR_MEMORY_ALLOCATION_FAILED, Error) \ V(ERR_MESSAGE_TARGET_CONTEXT_UNAVAILABLE, Error) \ V(ERR_MISSING_ARGS, TypeError) \ - V(ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST, TypeError) \ + V(ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST, TypeError) \ V(ERR_MISSING_PASSPHRASE, TypeError) \ V(ERR_MISSING_PLATFORM_FOR_WORKER, Error) \ V(ERR_NON_CONTEXT_AWARE_DISABLED, Error) \ @@ -98,7 +98,7 @@ void OnFatalError(const char* location, const char* message); V(ERR_MESSAGE_TARGET_CONTEXT_UNAVAILABLE, \ "A message object could not be deserialized successfully in the target " \ "vm.Context") \ - V(ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST, \ + V(ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST, \ "Object that needs transfer was found in message but not listed " \ "in transferList") \ V(ERR_MISSING_PLATFORM_FOR_WORKER, \ diff --git a/src/node_messaging.cc b/src/node_messaging.cc index 22d2ff72572..da2e915d02d 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -354,9 +354,7 @@ class SerializerDelegate : public ValueSerializer::Delegate { ThrowDataCloneError(env_->clone_unsupported_type_str()); return Nothing<bool>(); } else if (mode == BaseObject::TransferMode::kTransferable) { - // TODO(addaleax): This message code is too specific. Fix that in a - // semver-major follow-up. - THROW_ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST(env_); + THROW_ERR_MISSING_TRANSFERABLE_IN_TRANSFER_LIST(env_); return Nothing<bool>(); } |