Skip to content

Commit 6da82b1

Browse files
committedFeb 6, 2019
worker: remove undocumented .onclose property
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]>
1 parent 106dd1e commit 6da82b1

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed
 

‎lib/internal/worker/io.js

-6
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,6 @@ Object.defineProperty(MessagePort.prototype, onInitSymbol, {
102102

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

0 commit comments

Comments
 (0)
Please sign in to comment.