| Summary: | CountQueuingStrategy.constructor misses checking if the init.highWaterMark is exist or not | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | zyscoder <zyscoder> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | bugs-noreply, calvaris, cdumez, mcatanzaro, sam, webkit-bug-importer, youennf |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
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`