← Back to release summary

Shared Array Buffers (SABs) on Android

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 88)
Intent stage
Prepare to ship

Summary

Adds the JavaScript type SharedArrayBuffer to Android gated behind COOP/COEP. The concept of a SharedArrayBuffer is that a message to a worker, is posted but instead of copying the content of the array just a reference to it is shared, so that all have the same view on the shared chunk of data in the memory. This feature is only targeting Android - https://www.chromestatus.com/feature/4570991992766464 handles all other platforms

Motivation

SABs are currently disabled in Chrome on Android. As COOP/COEP have been released we can use ‘self.crossOriginIsolated’ to re-enable SABs on Android in case the site is isolated

Standards & signals

Docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer https://docs.google.com/document/d/1tXfF0sdMQJPtwc2qEGF_V_z5xiCkP3ayS5ByRz6Rc-A/edit?ts=5f236efa

Explainers: https://github.com/whatwg/html/issues/4732 https://github.com/whatwg/html/pull/4734

View on chromestatus.com