From d7641d833c2994d05aec7ca2c8d098d2cc758c4d Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 2 Jun 2019 16:46:13 +0200 Subject: [PATCH] worker: use DataCloneError for unknown native objects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This aligns the behaviour better with the web. PR-URL: https://github.com/nodejs/node/pull/28025 Reviewed-By: Michaƫl Zasso Reviewed-By: Rich Trott Reviewed-By: Joyee Cheung Reviewed-By: Colin Ihrig Reviewed-By: Tiancheng "Timothy" Gu --- doc/api/errors.md | 16 +++++--- src/env.h | 1 + src/node_errors.h | 2 - src/node_messaging.cc | 2 +- ...est-worker-message-port-transfer-native.js | 37 +++++++++++++++++++ 5 files changed, 49 insertions(+), 9 deletions(-) create mode 100644 test/parallel/test-worker-message-port-transfer-native.js diff --git a/doc/api/errors.md b/doc/api/errors.md index ebbe215b6075f1..131773143ceca7 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -671,12 +671,6 @@ An operation outside the bounds of a `Buffer` was attempted. An attempt has been made to create a `Buffer` larger than the maximum allowed size. - -### ERR_CANNOT_TRANSFER_OBJECT - -The value passed to `postMessage()` contained an object that is not supported -for transferring. - ### ERR_CANNOT_WATCH_SIGINT @@ -2013,6 +2007,16 @@ A module file could not be resolved while attempting a [`require()`][] or > Stability: 0 - Deprecated. These error codes are either inconsistent, or have > been removed. + +### ERR_CANNOT_TRANSFER_OBJECT + + +The value passed to `postMessage()` contained an object that is not supported +for transferring. + ### ERR_CLOSED_MESSAGE_PORT