Skip to content

Commit

Permalink
worker: remove undocumented .onclose property
Browse files Browse the repository at this point in the history
Remove setting of a 'close' event handler on MessagePort through the use
of an `.onclose` property. We don't use this convention anywhere else in
our codebase for 'close' events, this feature is undocumented, and we
don't test it.

PR-URL: #25904
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Yuta Hiroto <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
  • Loading branch information
Trott authored and addaleax committed Feb 6, 2019
1 parent 0b302e4 commit 52d4b7a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/internal/worker/io.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,6 @@ Object.defineProperty(MessagePort.prototype, onInitSymbol, {

// This is called after the underlying `uv_async_t` has been closed.
function onclose() {
if (typeof this.onclose === 'function') {
// Not part of the Web standard yet, but there aren't many reasonable
// alternatives in a non-EventEmitter usage setting.
// Refs: https://github.com/whatwg/html/issues/1766
this.onclose();
}
this.emit('close');
}

Expand Down

0 comments on commit 52d4b7a

Please sign in to comment.