Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2021-02-28 22:38:16 +0300
committerMichaël Zasso <targos@protonmail.com>2021-05-01 13:25:17 +0300
commitbd38dfbfcc5af7adb667c7e1c64e82c1e5a844fc (patch)
tree4d8cdd5664fe79233c7a231f300934c9a7f7b3ac /lib
parent13d972dd86ccfc4cd99676b54e5a17054dd7f01f (diff)
domain: add name to monkey-patched emit function
The domain module monkey patches EventEmitter.prototype.emit(), however the function's name was becoming the empty string. This commit forces the new emit function to have the proper name. PR-URL: https://github.com/nodejs/node/pull/37550 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/domain.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/domain.js b/lib/domain.js
index 4e6cfcebc3a..acd5dc8221d 100644
--- a/lib/domain.js
+++ b/lib/domain.js
@@ -456,7 +456,7 @@ EventEmitter.init = function() {
};
const eventEmit = EventEmitter.prototype.emit;
-EventEmitter.prototype.emit = function(...args) {
+EventEmitter.prototype.emit = function emit(...args) {
const domain = this.domain;
const type = args[0];