Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

Commit 738b3a2

Browse files
authored
CSS and SharedArrayBuffer: don't make support conditional
1 parent 4e84add commit 738b3a2

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

css/css-layout-api/constraints-data-sab-failure.https.html

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,9 @@
3535
let childFragment = null;
3636

3737
try {
38-
// We need SABs to be enabled to properly run this test.
39-
if (typeof SharedArrayBuffer !== 'undefined') {
40-
childFragment = yield child.layoutNextFragment({
41-
data: { sab: new SharedArrayBuffer(4) }
42-
});
43-
} else {
44-
throw Error();
45-
}
38+
childFragment = yield child.layoutNextFragment({
39+
data: { sab: new SharedArrayBuffer(4) }
40+
});
4641
} catch(e) {
4742
// Success! The structured cloning algorithm should have thrown an error.
4843
childFragment = yield child.layoutNextFragment({});

css/css-layout-api/fragment-data-sab-failure.https.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@
3434
*layout(children, edges, constraints, styleMap) {
3535
const childFragments = yield children.map(child => child.layoutNextFragment());
3636

37-
if (typeof SharedArrayBuffer !== 'undefined') {
38-
return {autoBlockSize: 0, childFragments, data: {sab: new SharedArrayBuffer(4) }};
39-
} else {
40-
throw Error();
41-
}
37+
return {autoBlockSize: 0, childFragments, data: {sab: new SharedArrayBuffer(4) }};
4238
}
4339
});
4440
</script>

0 commit comments

Comments
 (0)