Skip to content

Commit

Permalink
CSS and SharedArrayBuffer: don't make support conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk authored Aug 7, 2019
1 parent 4e84add commit 738b3a2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
11 changes: 3 additions & 8 deletions css/css-layout-api/constraints-data-sab-failure.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,9 @@
let childFragment = null;

try {
// We need SABs to be enabled to properly run this test.
if (typeof SharedArrayBuffer !== 'undefined') {
childFragment = yield child.layoutNextFragment({
data: { sab: new SharedArrayBuffer(4) }
});
} else {
throw Error();
}
childFragment = yield child.layoutNextFragment({
data: { sab: new SharedArrayBuffer(4) }
});
} catch(e) {
// Success! The structured cloning algorithm should have thrown an error.
childFragment = yield child.layoutNextFragment({});
Expand Down
6 changes: 1 addition & 5 deletions css/css-layout-api/fragment-data-sab-failure.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@
*layout(children, edges, constraints, styleMap) {
const childFragments = yield children.map(child => child.layoutNextFragment());

if (typeof SharedArrayBuffer !== 'undefined') {
return {autoBlockSize: 0, childFragments, data: {sab: new SharedArrayBuffer(4) }};
} else {
throw Error();
}
return {autoBlockSize: 0, childFragments, data: {sab: new SharedArrayBuffer(4) }};
}
});
</script>
Expand Down

0 comments on commit 738b3a2

Please sign in to comment.