Bug 156911 - [Fetch API] FetchResponse should return a ReadableStream even if disturbed
Summary: [Fetch API] FetchResponse should return a ReadableStream even if disturbed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords:
Depends on:
Blocks: 151937
  Show dependency treegraph
 
Reported: 2016-04-22 07:33 PDT by youenn fablet
Modified: 2016-04-29 01:14 PDT (History)
3 users (show)

See Also:


Attachments
Patch (7.21 KB, patch)
2016-04-22 07:42 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (7.29 KB, patch)
2016-04-28 23:37 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 youenn fablet 2016-04-22 07:33:19 PDT
As per the specification, FetchResponse body should be a ReadableStream even if disturbed.
Currently, body is null if body is consumed.
Comment 1 youenn fablet 2016-04-22 07:42:29 PDT
Created attachment 277060 [details]
Patch
Comment 2 Darin Adler 2016-04-22 17:10:45 PDT
Comment on attachment 277060 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=277060&action=review

> Source/WebCore/Modules/fetch/FetchResponse.cpp:296
> +    ASSERT(!FetchBodyOwner::isDisturbed());

Why not just ASSERT(!isDisturbed())?
Comment 3 youenn fablet 2016-04-24 04:57:01 PDT
Thanks for the review.

(In reply to comment #2)
> Comment on attachment 277060 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=277060&action=review
> 
> > Source/WebCore/Modules/fetch/FetchResponse.cpp:296
> > +    ASSERT(!FetchBodyOwner::isDisturbed());
> 
> Why not just ASSERT(!isDisturbed())?

Right, this is only an ASSERT.
I'll update the patch accordingly.
Comment 4 youenn fablet 2016-04-28 23:37:09 PDT
Created attachment 277677 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2016-04-29 01:14:41 PDT
Comment on attachment 277677 [details]
Patch for landing

Clearing flags on attachment: 277677

Committed r200235: <http://trac.webkit.org/changeset/200235>
Comment 6 WebKit Commit Bot 2016-04-29 01:14:45 PDT
All reviewed patches have been landed.  Closing bug.