domain: remove deprecated API call · nodejs/node@95b8b7e

Original file line numberDiff line numberDiff line change

@@ -270,7 +270,7 @@ Domain.prototype._errorHandler = function(er) {

270270

// as this would throw an error, make the process exit, and thus

271271

// prevent the process 'uncaughtException' event from being emitted

272272

// if a listener is set.

273-

if (EventEmitter.listenerCount(this, 'error') > 0) {

273+

if (this.listenerCount('error') > 0) {

274274

// Clear the uncaughtExceptionCaptureCallback so that we know that, since

275275

// the top-level domain is not active anymore, it would be ok to abort on

276276

// an uncaught exception at this point