RESOLVED INVALID 226584
Request.constructor misses checking for the type of input param
https://bugs.webkit.org/show_bug.cgi?id=226584
Summary Request.constructor misses checking for the type of input param
zyscoder@gmail.com
Reported 2021-06-03 08:11:26 PDT
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
youenn fablet
Comment 1 2021-06-07 01:30:50 PDT
I guess it is converted to a USVString. Chrome and Firefox do have the same behavior.
youenn fablet
Comment 2 2021-06-07 01:31:34 PDT
I do not see a test for it, which might be good to add. Closing as Invalid since all browsers behave the same.
Note You need to log in before you can comment on or make changes to this bug.