Bug 200130 - Response constructor doesn't throw on disturbed ReadableStream
Summary: Response constructor doesn't throw on disturbed ReadableStream
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: Safari 12
Hardware: Macintosh macOS 10.14
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-07-25 10:17 PDT by Paul Rumkin
Modified: 2019-08-05 17:36 PDT (History)
10 users (show)

See Also:


Attachments
Patch (22.04 KB, patch)
2019-08-04 19:28 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (21.90 KB, patch)
2019-08-04 19:51 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (21.88 KB, patch)
2019-08-04 23:24 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-highsierra (3.19 MB, application/zip)
2019-08-05 00:32 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews115 for mac-highsierra (3.00 MB, application/zip)
2019-08-05 01:14 PDT, Build Bot
no flags Details
Patch (22.62 KB, patch)
2019-08-05 14:11 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (28.50 KB, patch)
2019-08-05 15:11 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 Build Bot 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 Build Bot 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 Build Bot 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 Build Bot 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.