From 233e25f04e02c3f2bf54a6928aca30083f808599 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 3 Feb 2019 02:06:27 -0800 Subject: [PATCH] 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. --- lib/internal/worker/io.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/internal/worker/io.js b/lib/internal/worker/io.js index ad8056b5b9108a..9aa8c199588050 100644 --- a/lib/internal/worker/io.js +++ b/lib/internal/worker/io.js @@ -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'); }