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
fix: make WHATWG streams more compliant #10967
Conversation
@@ -3475,7 +3635,11 @@ | |||
* @param {R} chunk | |||
* @returns {void} | |||
*/ | |||
enqueue(chunk) { | |||
enqueue(chunk = undefined) { |
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 is odd... is there a reason?
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.
Yup - prototype.enqueue.length
will be wrong otherwise (1 instead of 0). Optional fields shouldn't count towards length, and this marks a field as optional in JS.
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.
LGTM, just one comment on an odd coding style.
This PR fixes a lot of WPT tests, mainly by moving a lot of the custom validation logic to use converters from the deno_webidl crate. It also fixes various issue with how callbacks are handled and normalized.
There are still many, many failing tests, but I would rather land this as is to not inflate the diff on this PR even more.