mirror of
https://github.com/nodejs/node.git
synced 2025-05-09 05:41:13 +00:00

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>
18 lines
427 B
JavaScript
18 lines
427 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const assert = require('assert');
|
|
const domain = require('domain');
|
|
const inspector = require('inspector');
|
|
|
|
process.on('warning', common.mustCall((warning) => {
|
|
assert.strictEqual(warning.code, 'DEP0097');
|
|
assert.match(warning.message, /Triggered by calling emit on process/);
|
|
}));
|
|
|
|
domain.create().run(() => {
|
|
inspector.open();
|
|
});
|