From 9bcc5a8f01acf9583b45b3bbddf8f043a001bb3c Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Mon, 4 Aug 2025 20:51:16 -0700 Subject: [PATCH] domain: remove deprecated API call PR-URL: https://github.com/nodejs/node/pull/59339 Reviewed-By: Luigi Pinca Reviewed-By: Anna Henningsen Reviewed-By: Daeyeon Jeong --- lib/domain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/domain.js b/lib/domain.js index 03d240e98d4..7dd16ee1bf5 100644 --- a/lib/domain.js +++ b/lib/domain.js @@ -270,7 +270,7 @@ Domain.prototype._errorHandler = function(er) { // as this would throw an error, make the process exit, and thus // prevent the process 'uncaughtException' event from being emitted // if a listener is set. - if (EventEmitter.listenerCount(this, 'error') > 0) { + if (this.listenerCount('error') > 0) { // Clear the uncaughtExceptionCaptureCallback so that we know that, since // the top-level domain is not active anymore, it would be ok to abort on // an uncaught exception at this point