Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SharedArrayBuffer constructor is not always exposed #22358

Closed
annevk opened this issue Mar 20, 2020 · 1 comment
Closed

SharedArrayBuffer constructor is not always exposed #22358

annevk opened this issue Mar 20, 2020 · 1 comment

Comments

@annevk
Copy link
Member

annevk commented Mar 20, 2020

Per discussion in whatwg/html#4732 the SharedArrayBuffer constructor is not always going to be exposed so tests need to use COOP+COEP or new WebAssembly.Memory({ shared:true, initial:numberOf64KBPages, maximum:numberOf64KBPages }).buffer to get an instance. Most of the html/ matches should be good already. IndexedDB/ matches, but doesn't have any test.

cc @syg @ricea

IndexedDB/structured-clone.any.js
compression/decompression-bad-chunks.tentative.any.js
compression/compression-bad-chunks.tentative.any.js
css/css-layout-api/fragment-data-sab-failure.https.html
css/css-layout-api/constraints-data-sab-failure.https.html
encoding/streams/decode-utf8.any.js
encoding/textdecoder-streaming.any.js
encoding/textdecoder-copy.any.js
encoding/encodeInto.any.js
html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-failure.https.any.js
html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-success.any.js
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-messagechannel-success.https.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-similar-but-cross-origin-success.https.sub.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/no-coop-coep.https.any.js
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/iframe-failure.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe-messagechannel.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-popup.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/sharedworker-failure.js
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/incrementer-iframe-domain.sub.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/serviceworker-failure.js
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/broadcastchannel-iframe.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/nested-iframe-4-incrementer.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/test-incrementer.js
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/resources/broadcastchannel-worker.js
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-sharedworker-failure.https.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/no-transferring.https.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-iframe-messagechannel.https.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-history.https.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/broadcastchannel-success.https.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-failure.https.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-domain-success.https.sub.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/blob-data.https.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/identity-not-preserved.https.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-notifications-api.any.js
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-serviceworker-failure.https.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/serialization-via-idb.any.js
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/window-simple-success.https.html
html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/broadcastchannel-success-and-failure.https.html
orientation-sensor/orientation-sensor-tests.js
portals/portal-activate-data.html
wasm/serialization/module/resources/test-incrementer.js
wasm/jsapi/memory/grow.any.js
wasm/jsapi/memory/constructor.any.js
webaudio/the-audio-api/the-audioworklet-interface/processors/sharedarraybuffer-processor.js
webaudio/the-audio-api/the-audioworklet-interface/audioworklet-postmessage-sharedarraybuffer.https.html
webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html
xhr/send-data-sharedarraybuffer.any.js

(Result of grep --files-with-matches --recursive SharedArrayBuffer *.)

@annevk
Copy link
Member Author

annevk commented Mar 23, 2020

annevk added a commit that referenced this issue Mar 24, 2020
And verify that the SharedArrayBuffer constructor isn't exposed without COOP+COEP.

For #22358.
@annevk annevk closed this as completed Mar 24, 2020
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Mar 31, 2020
…uffer instance, a=testonly

Automatic update from web-platform-tests
Encoding: use Wasm to get a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: 4e83bff9e071561dd10538dda073cd2f43b68e4a
wpt-pr: 22361
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Mar 31, 2020
…Wasm to get a SharedArrayBuff…, a=testonly

Automatic update from web-platform-tests
Audio/Orientation/Portals: use Wasm to get a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: a9b173567826e62591410560abbef047b534f01d
wpt-pr: 22363
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Mar 31, 2020
…a SharedArrayBuffer instancd, a=testonly

Automatic update from web-platform-tests
XHR/CSS/Compression: use Wasm to get at a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: c8d8f8e2d426e71c11f86512fadd5d8744413c13
wpt-pr: 22359
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Mar 31, 2020
…r instance, a=testonly

Automatic update from web-platform-tests
HTML: use Wasm to get a SharedArrayBuffer instance

And verify that the SharedArrayBuffer constructor isn't exposed without COOP+COEP.

For web-platform-tests/wpt#22358.

--

wpt-commits: 288c95a86dd02d0fe28bbfd49a2ee0a7801faa43
wpt-pr: 22385
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Mar 31, 2020
…uffer instance, a=testonly

Automatic update from web-platform-tests
Encoding: use Wasm to get a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: 4e83bff9e071561dd10538dda073cd2f43b68e4a
wpt-pr: 22361
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Mar 31, 2020
…Wasm to get a SharedArrayBuff…, a=testonly

Automatic update from web-platform-tests
Audio/Orientation/Portals: use Wasm to get a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: a9b173567826e62591410560abbef047b534f01d
wpt-pr: 22363
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Mar 31, 2020
…a SharedArrayBuffer instancd, a=testonly

Automatic update from web-platform-tests
XHR/CSS/Compression: use Wasm to get at a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: c8d8f8e2d426e71c11f86512fadd5d8744413c13
wpt-pr: 22359
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Mar 31, 2020
…r instance, a=testonly

Automatic update from web-platform-tests
HTML: use Wasm to get a SharedArrayBuffer instance

And verify that the SharedArrayBuffer constructor isn't exposed without COOP+COEP.

For web-platform-tests/wpt#22358.

--

wpt-commits: 288c95a86dd02d0fe28bbfd49a2ee0a7801faa43
wpt-pr: 22385
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Apr 1, 2020
…uffer instance, a=testonly

Automatic update from web-platform-tests
Encoding: use Wasm to get a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: 4e83bff9e071561dd10538dda073cd2f43b68e4a
wpt-pr: 22361

UltraBlame original commit: 401be49e000042c8161bbfc88ff20d8a493cb970
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Apr 1, 2020
…Wasm to get a SharedArrayBuff…, a=testonly

Automatic update from web-platform-tests
Audio/Orientation/Portals: use Wasm to get a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: a9b173567826e62591410560abbef047b534f01d
wpt-pr: 22363

UltraBlame original commit: 6e964df902594c5963b7e6313301b1241f6ef46c
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Apr 1, 2020
…a SharedArrayBuffer instancd, a=testonly

Automatic update from web-platform-tests
XHR/CSS/Compression: use Wasm to get at a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: c8d8f8e2d426e71c11f86512fadd5d8744413c13
wpt-pr: 22359

UltraBlame original commit: 5cd0a8d5e1661ea051b6cb61885f80affcb93701
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Apr 1, 2020
…r instance, a=testonly

Automatic update from web-platform-tests
HTML: use Wasm to get a SharedArrayBuffer instance

And verify that the SharedArrayBuffer constructor isn't exposed without COOP+COEP.

For web-platform-tests/wpt#22358.

--

wpt-commits: 288c95a86dd02d0fe28bbfd49a2ee0a7801faa43
wpt-pr: 22385

UltraBlame original commit: 149839b40bf29217aee70e9e6326568db5c2b926
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Apr 1, 2020
…uffer instance, a=testonly

Automatic update from web-platform-tests
Encoding: use Wasm to get a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: 4e83bff9e071561dd10538dda073cd2f43b68e4a
wpt-pr: 22361

UltraBlame original commit: 401be49e000042c8161bbfc88ff20d8a493cb970
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Apr 1, 2020
…Wasm to get a SharedArrayBuff…, a=testonly

Automatic update from web-platform-tests
Audio/Orientation/Portals: use Wasm to get a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: a9b173567826e62591410560abbef047b534f01d
wpt-pr: 22363

UltraBlame original commit: 6e964df902594c5963b7e6313301b1241f6ef46c
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Apr 1, 2020
…a SharedArrayBuffer instancd, a=testonly

Automatic update from web-platform-tests
XHR/CSS/Compression: use Wasm to get at a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: c8d8f8e2d426e71c11f86512fadd5d8744413c13
wpt-pr: 22359

UltraBlame original commit: 5cd0a8d5e1661ea051b6cb61885f80affcb93701
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Apr 1, 2020
…r instance, a=testonly

Automatic update from web-platform-tests
HTML: use Wasm to get a SharedArrayBuffer instance

And verify that the SharedArrayBuffer constructor isn't exposed without COOP+COEP.

For web-platform-tests/wpt#22358.

--

wpt-commits: 288c95a86dd02d0fe28bbfd49a2ee0a7801faa43
wpt-pr: 22385

UltraBlame original commit: 149839b40bf29217aee70e9e6326568db5c2b926
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Apr 1, 2020
…uffer instance, a=testonly

Automatic update from web-platform-tests
Encoding: use Wasm to get a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: 4e83bff9e071561dd10538dda073cd2f43b68e4a
wpt-pr: 22361

UltraBlame original commit: 401be49e000042c8161bbfc88ff20d8a493cb970
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Apr 1, 2020
…Wasm to get a SharedArrayBuff…, a=testonly

Automatic update from web-platform-tests
Audio/Orientation/Portals: use Wasm to get a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: a9b173567826e62591410560abbef047b534f01d
wpt-pr: 22363

UltraBlame original commit: 6e964df902594c5963b7e6313301b1241f6ef46c
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Apr 1, 2020
…a SharedArrayBuffer instancd, a=testonly

Automatic update from web-platform-tests
XHR/CSS/Compression: use Wasm to get at a SharedArrayBuffer instance

For web-platform-tests/wpt#22358.
--

wpt-commits: c8d8f8e2d426e71c11f86512fadd5d8744413c13
wpt-pr: 22359

UltraBlame original commit: 5cd0a8d5e1661ea051b6cb61885f80affcb93701
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Apr 1, 2020
…r instance, a=testonly

Automatic update from web-platform-tests
HTML: use Wasm to get a SharedArrayBuffer instance

And verify that the SharedArrayBuffer constructor isn't exposed without COOP+COEP.

For web-platform-tests/wpt#22358.

--

wpt-commits: 288c95a86dd02d0fe28bbfd49a2ee0a7801faa43
wpt-pr: 22385

UltraBlame original commit: 149839b40bf29217aee70e9e6326568db5c2b926
annevk added a commit to whatwg/html that referenced this issue Jun 29, 2020
A top-level navigation response with Cross-Origin-Opener-Policy set to same-origin and Cross-Origin-Embedder-Policy set to require-corp will create a cross-origin isolated browsing context group. And all agent clusters therein will be cross-origin isolated as well (shared and service workers can still not be, as they sit on the side).

This change also:

* Gates SharedArrayBuffer exposure behind that primitive for web compatibility reasons.
* Gates SharedArrayBuffer sharing behind that primitive.
* Exposes it through self.crossOriginIsolated.
* Makes document.domain return before it mutates the origin.
* Makes agent clusters keyed on origin.

Tests:

* web-platform-tests/wpt#17719
* web-platform-tests/wpt#17760
* web-platform-tests/wpt#17761
* web-platform-tests/wpt#17802
* web-platform-tests/wpt#17909
* web-platform-tests/wpt#18543
* web-platform-tests/wpt#20116
* web-platform-tests/wpt#22358

Closes #4732. Closes #5122. Closes #5444.

Follow-up: #5435.
annevk added a commit to whatwg/html that referenced this issue Jul 8, 2020
A top-level navigation response with Cross-Origin-Opener-Policy set to same-origin and Cross-Origin-Embedder-Policy set to require-corp will create a cross-origin isolated browsing context group. And all agent clusters therein will be cross-origin isolated as well (shared and service workers can still not be, as they sit on the side).

This change also:

* Gates SharedArrayBuffer exposure behind that primitive for web compatibility reasons.
* Gates SharedArrayBuffer sharing behind that primitive.
* Exposes it through self.crossOriginIsolated.
* Makes document.domain return before it mutates the origin.
* Makes agent clusters keyed on origin.

Tests:

* web-platform-tests/wpt#17719
* web-platform-tests/wpt#17760
* web-platform-tests/wpt#17761
* web-platform-tests/wpt#17802
* web-platform-tests/wpt#17909
* web-platform-tests/wpt#18543
* web-platform-tests/wpt#20116
* web-platform-tests/wpt#22358

Closes #4732. Closes #5122. Closes #5444.

Follow-up: #5435 (and #5362).
mfreed7 pushed a commit to mfreed7/html that referenced this issue Sep 11, 2020
A top-level navigation response with Cross-Origin-Opener-Policy set to same-origin and Cross-Origin-Embedder-Policy set to require-corp will create a cross-origin isolated browsing context group. And all agent clusters therein will be cross-origin isolated as well (shared and service workers can still not be, as they sit on the side).

This change also:

* Gates SharedArrayBuffer exposure behind that primitive for web compatibility reasons.
* Gates SharedArrayBuffer sharing behind that primitive.
* Exposes it through self.crossOriginIsolated.
* Makes document.domain return before it mutates the origin.
* Makes agent clusters keyed on origin.

Tests:

* web-platform-tests/wpt#17719
* web-platform-tests/wpt#17760
* web-platform-tests/wpt#17761
* web-platform-tests/wpt#17802
* web-platform-tests/wpt#17909
* web-platform-tests/wpt#18543
* web-platform-tests/wpt#20116
* web-platform-tests/wpt#22358

Closes whatwg#4732. Closes whatwg#5122. Closes whatwg#5444.

Follow-up: whatwg#5435 (and whatwg#5362).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant