Skip to content

Conversation

@katharosada
Copy link
Contributor

@katharosada katharosada commented Jan 13, 2022

Summary

In Safari version 15.2, Safari re-enabled SharedArrayBuffer but they also re-enabled Atomics but it was not mentioned in the release notes.

On top of that, Atomics.wake appears to have been renamed to Atomics.notify in line with other browsers and the spec that changed. tc39/ecma262#1220

Test results and supporting details

I've tested it myself in MacOS Safari 15.2. Note that other browsers support Atomics all the time, regardless of COOP/COEP headers but in Safari 15.2 Atomics is not defined unless in a cross-origin isolated context (if SharedArrayBuffer works, it also works).

I've built a little testing site with the cross-origin headers set correctly: https://atomics-browser-test.web.app/

Code is here: https://github.com/katharosada/atomics-test

I don't have a device with iOS but friends have reported the testing site is all green if on Safari 15.2 and the 15.3 public beta.

Supporting information

I've tried to follow the paper trail as best I can to figure out why it wasn't mentioned in the release notes.

Release notes for Safari 15.2 say that SharedArrayBuffer is enabled but do not mention Atomics: https://developer.apple.com/documentation/safari-release-notes/safari-15_2-release-notes

However, preview release notes for past versions clearly state that Atomics are enabled under the same feature flag: JSC_useSharedArrayBuffer. See: https://developer.apple.com/safari/technology-preview/release-notes/

And the release notes that describe enabling SharedArrayBuffer do so by enabling the JSC flag - as outlined in the linked changeset: https://trac.webkit.org/changeset/281832/webkit/

Related issues

#14056

@github-actions github-actions bot added the data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript label Jan 13, 2022
Copy link
Contributor

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR, @katharosada. I see it's your first to the project—welcome!

Looks great and the thorough background on this made a piece of cake to review. Thank you again! 🎉

@ddbeck ddbeck merged commit a924d29 into mdn:main Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants