File tree 1 file changed +6
-14
lines changed
1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change 8
8
9
9
// https://github.com/nodejs/node/issues/21219
10
10
// Adds Atomics.notify and warns on first usage of Atomics.wake
11
+ // https://github.com/v8/v8/commit/c79206b363 adds Atomics.notify so
12
+ // now we alias Atomics.wake to notify so that we can remove it
13
+ // semver major without worrying about V8.
11
14
12
- const AtomicsWake = global . Atomics . wake ;
15
+ const AtomicsNotify = global . Atomics . notify ;
13
16
const ReflectApply = global . Reflect . apply ;
14
17
15
- // wrap for function.name
16
- function notify ( ...args ) {
17
- return ReflectApply ( AtomicsWake , this , args ) ;
18
- }
19
-
20
18
const warning = 'Atomics.wake will be removed in a future version, ' +
21
19
'use Atomics.notify instead.' ;
22
20
23
21
let wakeWarned = false ;
24
- function wake ( ... args ) {
22
+ function wake ( typedArray , index , count ) {
25
23
if ( ! wakeWarned ) {
26
24
wakeWarned = true ;
27
25
32
30
}
33
31
}
34
32
35
- return ReflectApply ( AtomicsWake , this , args ) ;
33
+ return ReflectApply ( AtomicsNotify , this , arguments ) ;
36
34
}
37
35
38
36
global . Object . defineProperties ( global . Atomics , {
39
- notify : {
40
- value : notify ,
41
- writable : true ,
42
- enumerable : false ,
43
- configurable : true ,
44
- } ,
45
37
wake : {
46
38
value : wake ,
47
39
writable : true ,
You can’t perform that action at this time.
0 commit comments