| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1523650 commit b9df88a
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3313,16 +3313,21 @@ Values other than `undefined`, `null`, integer numbers, and integer strings | |||
| 3313 | 3313 | ||
| 3314 | 3314 | <!-- YAML | |
| 3315 | 3315 | changes: | |
| 3316 | + - version: REPLACEME | ||
| 3317 | + pr-url: https://github.com/nodejs/node/pull/51179 | ||
| 3318 | + description: Runtime deprecation. | ||
| 3316 | 3319 | - version: | |
| 3317 | 3320 | - v18.8.0 | |
| 3318 | 3321 | - v16.18.0 | |
| 3319 | 3322 | pr-url: https://github.com/nodejs/node/pull/44093 | |
| 3320 | 3323 | description: Documentation-only deprecation. | |
| 3321 | 3324 | --> | |
| 3322 | 3325 | ||
| 3323 | - Type: Documentation-only | ||
| 3326 | + Type: Runtime | ||
| 3324 | 3327 | ||
| 3325 | - The [`--trace-atomics-wait`][] flag is deprecated. | ||
| 3328 | + The [`--trace-atomics-wait`][] flag is deprecated because | ||
| 3329 | + it uses the V8 hook `SetAtomicsWaitCallback`, | ||
| 3330 | + that will be removed in a future V8 release. | ||
| 3326 | 3331 | ||
| 3327 | 3332 | ### DEP0166: Double slashes in imports and exports targets | |
| 3328 | 3333 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -258,6 +258,10 @@ void Environment::InitializeDiagnostics() { | |||
| 258 | 258 | if (options_->trace_uncaught) | |
| 259 | 259 | isolate_->SetCaptureStackTraceForUncaughtExceptions(true); | |
| 260 | 260 | if (options_->trace_atomics_wait) { | |
| 261 | + ProcessEmitDeprecationWarning( | ||
| 262 | + Environment::GetCurrent(isolate_), | ||
| 263 | + "The flag --trace-atomics-wait is deprecated.", | ||
| 264 | + "DEP0165"); | ||
| 261 | 265 | isolate_->SetAtomicsWaitCallback(AtomicsWaitCallback, this); | |
| 262 | 266 | AddCleanupHook([](void* data) { | |
| 263 | 267 | Environment* env = static_cast<Environment*>(data); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,14 @@ | |||
| 1 | + 'use strict'; | ||
| 2 | + | ||
| 3 | + const common = require('../common'); | ||
| 4 | + const assert = require('node:assert'); | ||
| 5 | + const { test } = require('node:test'); | ||
| 6 | + | ||
| 7 | + test('should emit deprecation warning DEP0165', async () => { | ||
| 8 | + const { code, stdout, stderr } = await common.spawnPromisified( | ||
| 9 | + process.execPath, ['--trace-atomics-wait', '-e', '{}'] | ||
| 10 | + ); | ||
| 11 | + assert.match(stderr, /\[DEP0165\] DeprecationWarning:/); | ||
| 12 | + assert.strictEqual(stdout, ''); | ||
| 13 | + assert.strictEqual(code, 0); | ||
| 14 | + }); | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,7 +25,7 @@ if (process.argv[2] === 'child') { | |||
| 25 | 25 | ||
| 26 | 26 | const proc = child_process.spawnSync( | |
| 27 | 27 | process.execPath, | |
| 28 | - [ '--trace-atomics-wait', __filename, 'child' ], | ||
| 28 | + [ '--disable-warning=DEP0165', '--trace-atomics-wait', __filename, 'child' ], | ||
| 29 | 29 | { encoding: 'utf8', stdio: [ 'inherit', 'inherit', 'pipe' ] }); | |
| 30 | 30 | ||
| 31 | 31 | if (proc.status !== 0) console.log(proc); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments