Skip to content

Commit 52d4b7a

Browse files
Trottaddaleax
authored andcommitted
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 <benjamingr@gmail.com> Reviewed-By: Yuta Hiroto <hello@hiroppy.me> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
1 parent 0b302e4 commit 52d4b7a

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)