summaryrefslogtreecommitdiff
path: root/lib/internal/per_context
diff options
context:
space:
mode:
authorGus Caplan <me@gus.host>2019-03-31 15:02:29 -0500
committerGus Caplan <me@gus.host>2019-04-03 16:55:59 -0500
commit15c0947fee2078bae4af1404e64448bf959a53bb (patch)
tree539f14352f86bf4c4c8b4bcda75b7a48b3a57ff3 /lib/internal/per_context
parent9dba96dc1a754616c81a550c057ce7cf9552e9cf (diff)
downloadandroid-node-v8-15c0947fee2078bae4af1404e64448bf959a53bb.tar.gz
android-node-v8-15c0947fee2078bae4af1404e64448bf959a53bb.tar.bz2
android-node-v8-15c0947fee2078bae4af1404e64448bf959a53bb.zip
lib: remove Atomics.wake
PR-URL: https://github.com/nodejs/node/pull/27033 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'lib/internal/per_context')
-rw-r--r--lib/internal/per_context/setup.js39
1 files changed, 5 insertions, 34 deletions
diff --git a/lib/internal/per_context/setup.js b/lib/internal/per_context/setup.js
index 725ba403df..16bd7db586 100644
--- a/lib/internal/per_context/setup.js
+++ b/lib/internal/per_context/setup.js
@@ -5,40 +5,11 @@
'use strict';
// https://github.com/nodejs/node/issues/14909
-if (global.Intl) delete global.Intl.v8BreakIterator;
+if (global.Intl) {
+ delete global.Intl.v8BreakIterator;
+}
// https://github.com/nodejs/node/issues/21219
-// Adds Atomics.notify and warns on first usage of Atomics.wake
-// https://github.com/v8/v8/commit/c79206b363 adds Atomics.notify so
-// now we alias Atomics.wake to notify so that we can remove it
-// semver major without worrying about V8.
-
-const AtomicsNotify = global.Atomics.notify;
-const ReflectApply = global.Reflect.apply;
-
-const warning = 'Atomics.wake will be removed in a future version, ' +
- 'use Atomics.notify instead.';
-
-let wakeWarned = false;
-function wake(typedArray, index, count) {
- if (!wakeWarned) {
- wakeWarned = true;
-
- if (global.process !== undefined) {
- global.process.emitWarning(warning, 'Atomics');
- } else {
- global.console.error(`Atomics: ${warning}`);
- }
- }
-
- return ReflectApply(AtomicsNotify, this, arguments);
+if (global.Atomics) {
+ delete global.Atomics.wake;
}
-
-global.Object.defineProperties(global.Atomics, {
- wake: {
- value: wake,
- writable: true,
- enumerable: false,
- configurable: true,
- },
-});