Skip to content

Commit

Permalink
events: fix duplicate require which cause performance penalty
Browse files Browse the repository at this point in the history
PR-URL: #39892
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Nitzan Uziely <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Zijian Liu <[email protected]>
Reviewed-By: Qingyu Deng <[email protected]>
  • Loading branch information
wwwzbwcom authored and BethGriggs committed Sep 21, 2021
1 parent 1eca9bc commit f666f5a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const {
SymbolAsyncIterator,
} = primordials;
const kRejection = SymbolFor('nodejs.rejection');
const { inspect } = require('internal/util/inspect');

let spliceOne;

Expand All @@ -63,10 +64,6 @@ const {
},
} = require('internal/errors');

const {
inspect
} = require('internal/util/inspect');

const {
validateAbortSignal,
validateBoolean,
Expand Down Expand Up @@ -372,7 +369,6 @@ EventEmitter.prototype.emit = function emit(type, ...args) {
}

let stringifiedEr;
const { inspect } = require('internal/util/inspect');
try {
stringifiedEr = inspect(er);
} catch {
Expand Down

0 comments on commit f666f5a

Please sign in to comment.