Chrome 中没有原子?

No atomics in Chrome?

根据 chrome feature status 页面,chrome 应该从 60 版开始默认启用此功能,但 SharedArrayBufferAtomicsundefined 以下内容:

而不是在所有这些上,chrome://flags 中有一个标志来启用它们。请注意 node.js 8.x 确实 默认启用它们。为什么我没有这些?

如果您遵循该状态 link 并转到其文档行,您最终会进入 MDN:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer

在兼容性下,您会注意到 Chrome 以星号表示:

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.