Bug 226584
Summary: | Request.constructor misses checking for the type of input param | ||
---|---|---|---|
Product: | WebKit | Reporter: | zyscoder <zyscoder> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Normal | CC: | achristensen, bugs-noreply, mcatanzaro, sam, youennf |
Priority: | P2 | ||
Version: | WebKit Local Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
zyscoder@gmail.com
Steps to reproduce:
(1) Open a tab and navigate to any URL;
(2) Run the following code in the Console of Devtools:
```
new Request(undefined)
```
(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 https://fetch.spec.whatwg.org/#requestinfo says, the input param is of RequestInfo type, and RequestInfo is of Request or USVString type. Since the code above sets the input param as undefined, a TypeError exception should be thrown.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
youenn fablet
I guess it is converted to a USVString.
Chrome and Firefox do have the same behavior.
youenn fablet
I do not see a test for it, which might be good to add.
Closing as Invalid since all browsers behave the same.