<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>226586</bug_id>
          
          <creation_ts>2021-06-03 08:15:56 -0700</creation_ts>
          <short_desc>Request.constructor misses checking for the type of init.signal param</short_desc>
          <delta_ts>2021-06-10 08:16:18 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="zyscoder@gmail.com">zyscoder</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>achristensen</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>sam</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1766394</commentid>
    <comment_count>0</comment_count>
    <who name="zyscoder@gmail.com">zyscoder</who>
    <bug_when>2021-06-03 08:15:56 -0700</bug_when>
    <thetext>Steps to reproduce:

(1) Open a tab and navigate to any URL;
(2) Run the following code in the Console of Devtools:
```
new Request(&apos;&apos;, {signal:{}})
```
(3) Then this code would be evaluated successfully without throwing any exception. Only a warning is asserted.

Actual results:

This code would be evaluated successfully without throwing any exception. Only a warning is asserted.

Expected results:

As https://fetch.spec.whatwg.org/#requestinfo says, the init.signal param is of AbortSignal type. Since the code above sets the input param as {}, a TypeError exception should be thrown. (Just behave as what the warning says.)

BTW, in my test both Chrome and Firefox throw exceptions when evaluating this code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1767352</commentid>
    <comment_count>1</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2021-06-07 01:35:35 -0700</bug_when>
    <thetext>See https://bugs.webkit.org/show_bug.cgi?id=199576 for some background info on why it is difficult to make it throw.
@zyscoder, what is the impact of not throwing here for you?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1768554</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-06-10 08:16:18 -0700</bug_when>
    <thetext>&lt;rdar://problem/79140275&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>