From bc2111c7e62710810805e0211e0411f9d1884fa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Jos=C3=A9=20Arboleda?= Date: Sun, 2 May 2021 22:43:08 -0500 Subject: [PATCH] src: make workers messaging more resilient PR-URL: https://github.com/nodejs/node/pull/38510 Fixes: https://github.com/nodejs/node/issues/38499 Reviewed-By: Anna Henningsen Reviewed-By: Rich Trott Reviewed-By: James M Snell --- doc/api/errors.md | 22 +++++++++---------- .../test-worker-message-port-close.js | 12 +++++++++- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index e2e169eefb5d3d..6be1cc47c25ac4 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -715,7 +715,17 @@ Used when the main process is trying to read data from the child process's STDERR/STDOUT, and the data's length is longer than the `maxBuffer` option. -### ERR_CLOSED_MESSAGE_PORT +### `ERR_CLOSED_MESSAGE_PORT` + There was an attempt to use a `MessagePort` instance in a closed state, usually after `.close()` has been called. @@ -2284,16 +2294,6 @@ removed: v12.5.0 The value passed to `postMessage()` contained an object that is not supported for transferring. - -### `ERR_CLOSED_MESSAGE_PORT` - - -There was an attempt to use a `MessagePort` instance in a closed -state, usually after `.close()` has been called. - ### `ERR_CRYPTO_HASH_DIGEST_NO_UTF16`