mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 08:00:26 +00:00

PR-URL: https://github.com/nodejs/node/pull/15454 Ref: https://github.com/nodejs/node/pull/14387 Ref: https://github.com/nodejs/node/pull/14722 Ref: https://github.com/nodejs/node/issues/14717 Ref: https://github.com/nodejs/node/issues/15448 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
23 lines
631 B
JavaScript
23 lines
631 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
common.skipIfInspectorDisabled();
|
|
common.skipIf32Bits();
|
|
|
|
const spawn = require('child_process').spawn;
|
|
|
|
const script = `
|
|
const assert = require('assert');
|
|
const async_wrap = process.binding('async_wrap');
|
|
const { kTotals } = async_wrap.constants;
|
|
|
|
assert.strictEqual(async_wrap.async_hook_fields[kTotals], 4);
|
|
process._debugEnd();
|
|
assert.strictEqual(async_wrap.async_hook_fields[kTotals], 0);
|
|
`;
|
|
|
|
const args = ['--inspect', '-e', script];
|
|
const child = spawn(process.execPath, args, { stdio: 'inherit' });
|
|
child.on('exit', (code, signal) => {
|
|
process.exit(code || signal);
|
|
});
|