diff options
author | Rich Trott <rtrott@gmail.com> | 2019-02-03 02:06:27 -0800 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-02-06 08:55:43 -0800 |
commit | 6da82b1057afb4dbc94e3eada224dfdb97d6a533 (patch) | |
tree | a808edac68b85fef4f159962397be7d65aae167a /lib | |
parent | 106dd1e345bcaa2f73ba7120a1163f8c6a021633 (diff) | |
download | android-node-v8-6da82b1057afb4dbc94e3eada224dfdb97d6a533.tar.gz android-node-v8-6da82b1057afb4dbc94e3eada224dfdb97d6a533.tar.bz2 android-node-v8-6da82b1057afb4dbc94e3eada224dfdb97d6a533.zip |
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: https://github.com/nodejs/node/pull/25904
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/internal/worker/io.js | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/internal/worker/io.js b/lib/internal/worker/io.js index ad8056b5b9..9aa8c19958 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'); } |