Skip to content

Commit 15c0947

Browse files
committed
lib: remove Atomics.wake
PR-URL: #27033 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent 9dba96d commit 15c0947

File tree

2 files changed

+5
-53
lines changed

2 files changed

+5
-53
lines changed

lib/internal/per_context/setup.js

+5-34
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,11 @@
55
'use strict';
66

77
// https://github.com/nodejs/node/issues/14909
8-
if (global.Intl) delete global.Intl.v8BreakIterator;
8+
if (global.Intl) {
9+
delete global.Intl.v8BreakIterator;
10+
}
911

1012
// https://github.com/nodejs/node/issues/21219
11-
// Adds Atomics.notify and warns on first usage of Atomics.wake
12-
// https://github.com/v8/v8/commit/c79206b363 adds Atomics.notify so
13-
// now we alias Atomics.wake to notify so that we can remove it
14-
// semver major without worrying about V8.
15-
16-
const AtomicsNotify = global.Atomics.notify;
17-
const ReflectApply = global.Reflect.apply;
18-
19-
const warning = 'Atomics.wake will be removed in a future version, ' +
20-
'use Atomics.notify instead.';
21-
22-
let wakeWarned = false;
23-
function wake(typedArray, index, count) {
24-
if (!wakeWarned) {
25-
wakeWarned = true;
26-
27-
if (global.process !== undefined) {
28-
global.process.emitWarning(warning, 'Atomics');
29-
} else {
30-
global.console.error(`Atomics: ${warning}`);
31-
}
32-
}
33-
34-
return ReflectApply(AtomicsNotify, this, arguments);
13+
if (global.Atomics) {
14+
delete global.Atomics.wake;
3515
}
36-
37-
global.Object.defineProperties(global.Atomics, {
38-
wake: {
39-
value: wake,
40-
writable: true,
41-
enumerable: false,
42-
configurable: true,
43-
},
44-
});

test/parallel/test-atomics-notify.js

-19
This file was deleted.

0 commit comments

Comments
 (0)