Steps to reproduce: (1) Open a tab and navigate to any URL; (2) Run the following code in the Console of Devtools: ``` new CountQueuingStrategy('any'); ``` (3) Then this code would be evaluated successfully without throwing any exceptions. Actual results: Then this code would be evaluated successfully without throwing any exceptions. Expected results: As https://streams.spec.whatwg.org/#cqs-constructor says, the init param is of {highWaterMark: double} type. Webkit should throw a TypeError exception when evaluating this code. In my test, Chrome and Firefox throw exceptions: Chrome: `TypeError: Failed to construct 'CountQueuingStrategy': cannot convert to dictionary` Firefox: `'highWaterMark' must not be undefined.`
Created attachment 430947 [details] Patch
Comment on attachment 430947 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=430947&action=review > Source/WebCore/Modules/streams/CountQueuingStrategy.js:44 > + value: @toNumber(parameters.highWaterMark), Likely not a good idea to access parameters.highWaterMark twice as it is web observable and it could return different values for each call. I think it'd be better to cache the result of parameters.highWaterMark.
Created attachment 431053 [details] Patch
Comment on attachment 431053 [details] Patch AS debug wk2 error is unrelated
Committed r278710 (238678@main): <https://commits.webkit.org/238678@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 431053 [details].
<rdar://problem/79145929>