Skip to content

Commit

Permalink
doc: clarify when messageerror is emitted
Browse files Browse the repository at this point in the history
Adapting addaleax's explanation from the issue.

Fixes: #36333
Signed-off-by: James M Snell <[email protected]>

PR-URL: #36780
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
  • Loading branch information
jasnell committed Jan 6, 2021
1 parent 3518919 commit 9ac4047
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/api/worker_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,12 @@ added:

The `'messageerror'` event is emitted when deserializing a message failed.

Currently, this event is emitted when there is an error occurring while
instantiating the posted JS object on the receiving end. Such situations
are rare, but can happen, for instance, when certain Node.js API objects
are received in a `vm.Context` (where Node.js APIs are currently
unavailable).

### `port.close()`
<!-- YAML
added: v10.5.0
Expand Down

0 comments on commit 9ac4047

Please sign in to comment.