-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
CSS and SharedArrayBuffer: don't make support conditional #17689
Conversation
} | ||
childFragment = yield child.layoutNextFragment({ | ||
data: { sab: new SharedArrayBuffer(4) } | ||
}); | ||
} catch(e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also seems kinda wrong as the specific error is not checked. Why is this not using assert_throws?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently the test passes if SAB isn't supported (but the API otherwise works). I assume that's intentional. If so, then it can't just use assert_throws, as that method can only check for one type of error at a time.
But I agree that restructuring it to use assert_throws (rather than a catch and then implicit success) would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SAB shouldn't be optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, your response is too terse for me to understand. Are you saying that it's okay for the test to fail if SAB isn't supported? This isn't intended to be a test for SAB support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test is only relevant if SharedArrayBuffer is supported. Having a test always succeed when a feature it's testing isn't supported is a not a pattern we generally follow and I'd rather we don't, ever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's reasonable.
Don't we need COOP & COEP? Also can you provide a change description? |
They're both testing that passing SAB somewhere throws. However, they only test this if SAB is in fact present. All this does is remove that conditional. This doesn't require COOP/COEP, as SAB should be available by default, it's just that |
No description provided.