Atomics

Atomics object provides atomic operations as static methods. They are used with SharedArrayBuffer and ArrayBuffer 对象。

描述

The Atomic operations are installed on an Atomics module. Unlike the other global objects, Atomics is not a constructor. You cannot use it with a new operator or invoke the Atomics object as a function. All properties and methods of Atomics are static (as is the case with the Math object, for example).

Atomic operations

When memory is shared, multiple threads can read and write the same data in memory. Atomic operations make sure that predictable values are written and read, that operations are finished before the next operation starts and that operations are not interrupted.

Wait and notify

wait() and notify() methods are modeled on Linux futexes ("fast user-space mutex") and provide ways for waiting until a certain condition becomes true and are typically used as blocking constructs.

静态方法

Atomics.add()
Adds the provided value to the existing value at the specified index of the array. Returns the old value at that index.
Atomics.and()
Computes a bitwise AND on the value at the specified index of the array with the provided value. Returns the old value at that index.
Atomics.compareExchange()
Stores a value at the specified index of the array, if it equals a value. Returns the old value.
Atomics.exchange()
Stores a value at the specified index of the array. Returns the old value.
Atomics.isLockFree(size)
An optimization primitive that can be used to determine whether to use locks or atomic operations. Returns true if an atomic operation on arrays of the given element size will be implemented using a hardware atomic operation (as opposed to a lock). Experts only.
Atomics.load()
Returns the value at the specified index of the array.
Atomics.notify()
Notifies agents that are waiting on the specified index of the array. Returns the number of agents that were notified.
Atomics.or()
Computes a bitwise OR on the value at the specified index of the array with the provided value. Returns the old value at that index.
Atomics.store()
Stores a value at the specified index of the array. Returns the value.
Atomics.sub()
Subtracts a value at the specified index of the array. Returns the old value at that index.
Atomics.wait()
Verifies that the specified index of the array still contains a value and sleeps awaiting or times out. Returns either " ok ", " not-equal ", or " timed-out ". If waiting is not allowed in the calling agent then it throws an Error exception. (Most browsers will not allow wait() on the browser's main thread.)
Atomics.xor()
Computes a bitwise XOR on the value at the specified index of the array with the provided value. Returns the old value at that index.

范例

Using Atomics

const sab = new SharedArrayBuffer(1024);
const ta = new Uint8Array(sab);
ta[0] = 5;
Atomics.add(ta, 0, 12);
Atomics.load(ta, 0); // 12
Atomics.and(ta, 0, 1);
Atomics.load(ta, 0);  // 1
Atomics.compareExchange(ta, 0, 5, 12);
Atomics.load(ta, 0); // 12
Atomics.exchange(ta, 0, 12);
Atomics.load(ta, 0); // 12
Atomics.isLockFree(1); // true
Atomics.isLockFree(2); // true
Atomics.isLockFree(3); // false
Atomics.isLockFree(4); // true
Atomics.or(ta, 0, 1);
Atomics.load(ta, 0);  // 5
Atomics.store(ta, 0, 12); // 12
Atomics.sub(ta, 0, 2);
Atomics.load(ta, 0); // 3
Atomics.xor(ta, 0, 1);
Atomics.load(ta, 0); // 4
					

Waiting and notifiying

Given a shared Int32Array :

const sab = new SharedArrayBuffer(1024);
const int32 = new Int32Array(sab);
					

A reading thread is sleeping and waiting on location 0 which is expected to be 0. As long as that is true, it will not go on. However, once the writing thread has stored a new value, it will be notified by the writing thread and return the new value (123).

Atomics.wait(int32, 0, 0);
console.log(int32[0]); // 123
					

A writing thread stores a new value and notifies the waiting thread once it has written:

console.log(int32[0]); // 0;
Atomics.store(int32, 0, 123);
Atomics.notify(int32, 0, 1);
					

规范

规范
ECMAScript (ECMA-262)
The definition of 'Atomics' in that specification.

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile Server
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet Node.js
Atomics Chrome 68
68
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Edge 79
79
不支持 16 — 17
Support was removed to mitigate speculative execution side-channel attacks (Windows blog) .
Firefox 78
78
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1 WebView Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Chrome Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Firefox Android 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
不支持 No
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
nodejs 8.10.0
Atomic operations on non-shared ArrayBuffer 对象 Chrome No Edge No Firefox 79 IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No nodejs No
add Chrome 68
68
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Edge 79
79
不支持 16 — 17
Support was removed to mitigate speculative execution side-channel attacks (Windows blog) .
Firefox 78
78
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1 WebView Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Chrome Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Firefox Android 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
不支持 No
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
nodejs 8.10.0
and Chrome 68
68
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Edge 79
79
不支持 16 — 17
Support was removed to mitigate speculative execution side-channel attacks (Windows blog) .
Firefox 78
78
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1 WebView Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Chrome Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Firefox Android 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
不支持 No
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
nodejs 8.10.0
compareExchange Chrome 68
68
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Edge 79
79
不支持 16 — 17
Support was removed to mitigate speculative execution side-channel attacks (Windows blog) .
Firefox 78
78
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1 WebView Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Chrome Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Firefox Android 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
不支持 No
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
nodejs 8.10.0
exchange Chrome 68
68
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Edge 79
79
不支持 16 — 17
Support was removed to mitigate speculative execution side-channel attacks (Windows blog) .
Firefox 78
78
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1 WebView Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Chrome Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Firefox Android 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
不支持 No
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
nodejs 8.10.0
isLockFree Chrome 68
68
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Edge 79
79
不支持 16 — 17
Support was removed to mitigate speculative execution side-channel attacks (Windows blog) .
Firefox 78
78
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1 WebView Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Chrome Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Firefox Android 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
不支持 No
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
nodejs 8.10.0
load Chrome 68
68
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Edge 79
79
不支持 16 — 17
Support was removed to mitigate speculative execution side-channel attacks (Windows blog) .
Firefox 78
78
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1 WebView Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Chrome Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Firefox Android 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
不支持 No
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
nodejs 8.10.0
notify Chrome 68
68
不支持 60 — 63
Alternate Name
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Alternate Name Uses the non-standard name: wake
Edge 79 Firefox 78
78
63
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 63: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
57
Alternate Name Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Alternate Name Uses the non-standard name: wake
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 48 — 55
Disabled
Disabled From version 48 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 46 — 48
Alternate Name Disabled
count parameter defaults to 0 instead of the later-specified +Infinity .
Alternate Name Uses the non-standard name: futexWake
Disabled From version 46 until version 48 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1
Alternate Name
不支持 10.1 — 11.1
Alternate Name
Alternate Name Uses the non-standard name: wake
WebView Android 60 — 63
Alternate Name
不支持 60 — 63
Alternate Name
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Alternate Name Uses the non-standard name: wake
Chrome Android 60 — 63
Alternate Name
不支持 60 — 63
Alternate Name
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Alternate Name Uses the non-standard name: wake
Firefox Android 63
Disabled
63
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 63: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
57
Alternate Name Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Alternate Name Uses the non-standard name: wake
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 48 — 55
Disabled
Disabled From version 48 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 46 — 48
Alternate Name Disabled
count parameter defaults to 0 instead of the later-specified +Infinity .
Alternate Name Uses the non-standard name: futexWake
Disabled From version 46 until version 48 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
Alternate Name
不支持 No
Alternate Name
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Alternate Name Uses the non-standard name: wake
nodejs 8.10.0
Alternate Name
8.10.0
Alternate Name
Alternate Name Uses the non-standard name: wake
or Chrome 68
68
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Edge 79
79
不支持 16 — 17
Support was removed to mitigate speculative execution side-channel attacks (Windows blog) .
Firefox 78
78
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1 WebView Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Chrome Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Firefox Android 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
不支持 No
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
nodejs 8.10.0
store Chrome 68
68
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Edge 79
79
不支持 16 — 17
Support was removed to mitigate speculative execution side-channel attacks (Windows blog) .
Firefox 78
78
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1 WebView Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Chrome Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Firefox Android 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
不支持 No
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
nodejs 8.10.0
sub Chrome 68
68
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Edge 79
79
不支持 16 — 17
Support was removed to mitigate speculative execution side-channel attacks (Windows blog) .
Firefox 78
78
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1 WebView Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Chrome Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Firefox Android 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
不支持 No
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
nodejs 8.10.0
wait Chrome 68
68
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Edge 79
79
不支持 16 — 17
Support was removed to mitigate speculative execution side-channel attacks (Windows blog) .
Firefox 78
78
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 48 — 55
Disabled
Disabled From version 48 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 46 — 48
Alternate Name Disabled
The method returns values Atomics.OK , Atomics.TIMEDOUT ,和 Atomics.NOTEQUAL , instead of the later-specified strings.
Alternate Name Uses the non-standard name: futexWait
Disabled From version 46 until version 48 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1 WebView Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Chrome Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Firefox Android 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 48 — 55
Disabled
Disabled From version 48 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 46 — 48
Alternate Name Disabled
The method returns values Atomics.OK , Atomics.TIMEDOUT ,和 Atomics.NOTEQUAL , instead of the later-specified strings.
Alternate Name Uses the non-standard name: futexWait
Disabled From version 46 until version 48 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
不支持 No
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
nodejs 8.10.0
xor Chrome 68
68
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This was a temporary removal while mitigations were put in place.
Edge 79
79
不支持 16 — 17
Support was removed to mitigate speculative execution side-channel attacks (Windows blog) .
Firefox 78
78
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE No Opera No Safari 10.1 — 11.1 WebView Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Chrome Android 60 — 63
不支持 60 — 63
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
Firefox Android 57
Disabled
57
Disabled
Support was disabled by default to mitigate speculative execution side-channel attacks (Mozilla Security Blog) .
Disabled From version 57: this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
不支持 55 — 57
不支持 46 — 55
Disabled
Disabled From version 46 until version 55 (exclusive): this feature is behind the javascript.options.shared_memory preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android No Safari iOS 10.3 — 11.3 Samsung Internet Android No
不支持 No
Chrome disabled SharedArrayBuffer on January 5, 2018 to help reduce the efficacy of speculative side-channel attacks . This is intended as a temporary measure until other mitigations are in place.
nodejs 8.10.0

图例

完整支持
完整支持
不支持
不支持
见实现注意事项。
用户必须明确启用此特征。
用户必须明确启用此特征。
使用非标名称。

另请参阅

Metadata