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 <jasnell@gmail.com>

PR-URL: #36780
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
  • Loading branch information
jasnell authored and danielleadams committed Jan 12, 2021
1 parent 61b0393 commit b4091ea
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 b4091ea

Please sign in to comment.