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

Add tests for QueuingStrategy size function prototype, constructibility #29555

Merged
merged 2 commits into from
Jul 1, 2021

Conversation

ninevra
Copy link
Contributor

@ninevra ninevra commented Jul 1, 2021

Adds four test cases asserting that the size functions associated with streams' ByteLengthQueuingStrategy and CountQueuingStrategy functions do not have prototype properties and cannot be constructed.

PR requested by @ricea in whatwg/streams#1142 (comment).

I believe this to be spec-required and major-implementation-compliant:

new ByteLengthQueuingStrategy({ highWaterMark: 100 }).size.prototype

gives undefined in Chrome and Firefox. The Streams spec calls CreateBuiltinFunction without calling MakeConstructor, which is the abstract op that adds the prototype property. So it would appear that we should in fact use arrow functions after all

Originally posted by @TimothyGu in jsdom/jsdom#3200 (comment)

Without an argument, this would throw TypeError regardless of whether it
was a constructor.
@domenic domenic merged commit c7e9917 into web-platform-tests:master Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants