Bug 226641 - CountQueuingStrategy.constructor misses checking if the init.highWaterMark is exist or not
Summary: CountQueuingStrategy.constructor misses checking if the init.highWaterMark is...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-04 05:26 PDT by zyscoder@gmail.com
Modified: 2021-06-11 05:27 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zyscoder@gmail.com 2021-06-04 05:26:34 PDT
Steps to reproduce:

(1) Open a tab and navigate to any URL;
(2) Run one of the following codes in the Console of Devtools:
```
new CountQueuingStrategy({highWaterMark:undefined}) / new CountQueuingStrategy({})
```
(3) Then this code would be evaluated successfully without throwing any exception.

Actual results:

This code is evaluated successfully without throwing any exception.

Expected results:

As the spec(https://streams.spec.whatwg.org/#dictdef-queuingstrategyinit) says, CountQueuingStrategy.constructor asks a double value as its init.highWaterMark param. Thus these codes should throw an exception.

In my test, both Chrome and Firefox throw exceptions:
Chrome: `VM1491:1 Uncaught TypeError: Failed to construct 'CountQueuingStrategy': required member highWaterMark is undefined.`
Firefox: `Uncaught TypeError: 'highWaterMark' must not be undefined`
Comment 1 Radar WebKit Bug Importer 2021-06-11 05:27:19 PDT
<rdar://problem/79193758>