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

Orientation/Portals: make SharedArrayBuffer non-optional #17720

Merged
merged 1 commit into from
Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions orientation-sensor/orientation-sensor-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ async function checkPopulateMatrix(t, sensorType) {
//Throws if no orientation data available.
assert_throws({ name: 'NotReadableError' }, () => sensor.populateMatrix(new Float32Array(16)));

if (window.SharedArrayBuffer) {
// Throws if passed SharedArrayBuffer view.
assert_throws({ name: 'TypeError' }, () => sensor.populateMatrix(new Float32Array(new SharedArrayBuffer(16))));
}
// Throws if passed SharedArrayBuffer view.
assert_throws({ name: 'TypeError' }, () => sensor.populateMatrix(new Float32Array(new SharedArrayBuffer(16))));

sensor.start();
await eventWatcher.wait_for("reading");
Expand Down
12 changes: 5 additions & 7 deletions portals/portal-activate-data.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,11 @@
assert_equals((await replyViaPort).data, 42);
}, "A message port can be passed through activate data.");

if (window.SharedArrayBuffer) {
promise_test(async t => {
await promise_rejects(
t, 'DataCloneError',
openPortalAndActivate('', {data: new SharedArrayBuffer}));
}, "A SharedArrayBuffer cannot be passed through activate data.");
}
promise_test(async t => {
await promise_rejects(
t, 'DataCloneError',
openPortalAndActivate('', {data: new SharedArrayBuffer}));
}, "A SharedArrayBuffer cannot be passed through activate data.");

promise_test(async t => {
await promise_rejects(
Expand Down