doc: runtime deprecate flag --trace-atomics-wait
PR-URL: https://github.com/nodejs/node/pull/51179 Refs: https://github.com/nodejs/node/issues/42982 Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
1523650005
commit
b9df88a8c2
@ -3313,6 +3313,9 @@ Values other than `undefined`, `null`, integer numbers, and integer strings
|
|||||||
|
|
||||||
<!-- YAML
|
<!-- YAML
|
||||||
changes:
|
changes:
|
||||||
|
- version: REPLACEME
|
||||||
|
pr-url: https://github.com/nodejs/node/pull/51179
|
||||||
|
description: Runtime deprecation.
|
||||||
- version:
|
- version:
|
||||||
- v18.8.0
|
- v18.8.0
|
||||||
- v16.18.0
|
- v16.18.0
|
||||||
@ -3320,9 +3323,11 @@ changes:
|
|||||||
description: Documentation-only deprecation.
|
description: Documentation-only deprecation.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
Type: Documentation-only
|
Type: Runtime
|
||||||
|
|
||||||
The [`--trace-atomics-wait`][] flag is deprecated.
|
The [`--trace-atomics-wait`][] flag is deprecated because
|
||||||
|
it uses the V8 hook `SetAtomicsWaitCallback`,
|
||||||
|
that will be removed in a future V8 release.
|
||||||
|
|
||||||
### DEP0166: Double slashes in imports and exports targets
|
### DEP0166: Double slashes in imports and exports targets
|
||||||
|
|
||||||
|
@ -258,6 +258,10 @@ void Environment::InitializeDiagnostics() {
|
|||||||
if (options_->trace_uncaught)
|
if (options_->trace_uncaught)
|
||||||
isolate_->SetCaptureStackTraceForUncaughtExceptions(true);
|
isolate_->SetCaptureStackTraceForUncaughtExceptions(true);
|
||||||
if (options_->trace_atomics_wait) {
|
if (options_->trace_atomics_wait) {
|
||||||
|
ProcessEmitDeprecationWarning(
|
||||||
|
Environment::GetCurrent(isolate_),
|
||||||
|
"The flag --trace-atomics-wait is deprecated.",
|
||||||
|
"DEP0165");
|
||||||
isolate_->SetAtomicsWaitCallback(AtomicsWaitCallback, this);
|
isolate_->SetAtomicsWaitCallback(AtomicsWaitCallback, this);
|
||||||
AddCleanupHook([](void* data) {
|
AddCleanupHook([](void* data) {
|
||||||
Environment* env = static_cast<Environment*>(data);
|
Environment* env = static_cast<Environment*>(data);
|
||||||
|
14
test/parallel/test-trace-atomic-deprecation.js
Normal file
14
test/parallel/test-trace-atomic-deprecation.js
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const common = require('../common');
|
||||||
|
const assert = require('node:assert');
|
||||||
|
const { test } = require('node:test');
|
||||||
|
|
||||||
|
test('should emit deprecation warning DEP0165', async () => {
|
||||||
|
const { code, stdout, stderr } = await common.spawnPromisified(
|
||||||
|
process.execPath, ['--trace-atomics-wait', '-e', '{}']
|
||||||
|
);
|
||||||
|
assert.match(stderr, /\[DEP0165\] DeprecationWarning:/);
|
||||||
|
assert.strictEqual(stdout, '');
|
||||||
|
assert.strictEqual(code, 0);
|
||||||
|
});
|
@ -25,7 +25,7 @@ if (process.argv[2] === 'child') {
|
|||||||
|
|
||||||
const proc = child_process.spawnSync(
|
const proc = child_process.spawnSync(
|
||||||
process.execPath,
|
process.execPath,
|
||||||
[ '--trace-atomics-wait', __filename, 'child' ],
|
[ '--disable-warning=DEP0165', '--trace-atomics-wait', __filename, 'child' ],
|
||||||
{ encoding: 'utf8', stdio: [ 'inherit', 'inherit', 'pipe' ] });
|
{ encoding: 'utf8', stdio: [ 'inherit', 'inherit', 'pipe' ] });
|
||||||
|
|
||||||
if (proc.status !== 0) console.log(proc);
|
if (proc.status !== 0) console.log(proc);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user