Bug 200130

Summary: Response constructor doesn't throw on disturbed ReadableStream
Product: WebKit Reporter: Paul Rumkin <dev>
Component: WebKit Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, annevk, benjamin, calvaris, cdumez, commit-queue, ews-watchlist, joepeck, rniwa, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: Mac   
OS: macOS 10.14   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Archive of layout-test-results from ews103 for mac-highsierra
none
Archive of layout-test-results from ews115 for mac-highsierra
none
Patch
none
Patch none

Description Paul Rumkin 2019-07-25 10:17:43 PDT
It looks like a regression of the bug #156911

Example code which doesn't throw:

    try {
      const stream = new ReadableStream()
      stream.cancel();
    
      new Response(stream)
    
      console.log("Doesn't throw")
    }
    catch (_) {
      console.log("Throws")
    }

Expected behavior: Output "Throws"
Current behavior: Output "Doesn't throw"

Check online: https://jsbin.com/yitaloburu/edit?js,console

Safari version is 12.1.1
Comment 1 Radar WebKit Bug Importer 2019-07-25 11:12:40 PDT
<rdar://problem/53550351>
Comment 2 youenn fablet 2019-08-04 19:28:14 PDT
Created attachment 375515 [details]
Patch
Comment 3 youenn fablet 2019-08-04 19:51:54 PDT
Created attachment 375516 [details]
Patch
Comment 4 youenn fablet 2019-08-04 23:24:30 PDT
Created attachment 375521 [details]
Patch
Comment 5 EWS Watchlist 2019-08-05 00:32:46 PDT
Comment on attachment 375521 [details]
Patch

Attachment 375521 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/12862664

New failing tests:
imported/w3c/web-platform-tests/fetch/api/request/request-init-stream.any.html
Comment 6 EWS Watchlist 2019-08-05 00:32:47 PDT
Created attachment 375524 [details]
Archive of layout-test-results from ews103 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 7 EWS Watchlist 2019-08-05 01:14:55 PDT
Comment on attachment 375521 [details]
Patch

Attachment 375521 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/12862708

New failing tests:
imported/w3c/web-platform-tests/fetch/api/request/request-init-stream.any.html
Comment 8 EWS Watchlist 2019-08-05 01:14:57 PDT
Created attachment 375525 [details]
Archive of layout-test-results from ews115 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 9 youenn fablet 2019-08-05 14:11:07 PDT
Created attachment 375552 [details]
Patch
Comment 10 youenn fablet 2019-08-05 15:11:19 PDT
Created attachment 375565 [details]
Patch
Comment 11 WebKit Commit Bot 2019-08-05 17:36:16 PDT
Comment on attachment 375565 [details]
Patch

Clearing flags on attachment: 375565

Committed r248283: <https://trac.webkit.org/changeset/248283>
Comment 12 WebKit Commit Bot 2019-08-05 17:36:18 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Sam Sneddon [:gsnedders] 2022-06-21 14:56:33 PDT
*** Bug 189042 has been marked as a duplicate of this bug. ***