RESOLVED FIXED 196757
Cache API should return Abort error in case of putting an aborted fetch
https://bugs.webkit.org/show_bug.cgi?id=196757
Summary Cache API should return Abort error in case of putting an aborted fetch
youenn fablet
Reported 2019-04-09 18:26:34 PDT
Cache API should return Abort error in case of putting an aborted fetch
Attachments
Patch (11.96 KB, patch)
2019-04-09 18:31 PDT, youenn fablet
no flags
Patch for landing (12.07 KB, patch)
2019-04-22 13:28 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2019-04-09 18:27:54 PDT
youenn fablet
Comment 2 2019-04-09 18:31:13 PDT
Ryan Haddad
Comment 3 2019-04-12 11:46:58 PDT
Looks like EWS is all green. Who should review this?
Darin Adler
Comment 4 2019-04-13 13:49:42 PDT
Comment on attachment 367093 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367093&action=review > Source/WebCore/ChangeLog:8 > + In case of an aborted fetch, return consume callback with an AbortError. I don’t understand what "return consume callback" means. I think you mean "invoke consume callback" or "call consume callback". > Source/WebCore/Modules/fetch/FetchResponse.cpp:217 > + if (auto bodyLoader = WTFMove(m_bodyLoader)) I am not sure that just doing std::move is a resilient design in cases like this. Using std::exchange gives a stronger guarantee that m_bodyLoader will actually become null and likely generates identical code. I have used std::move for this in the past but I am less sure now than I was then.
youenn fablet
Comment 5 2019-04-22 13:21:31 PDT
Comment on attachment 367093 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=367093&action=review >> Source/WebCore/ChangeLog:8 >> + In case of an aborted fetch, return consume callback with an AbortError. > > I don’t understand what "return consume callback" means. I think you mean "invoke consume callback" or "call consume callback". Right, call consume callback is more appropriate. >> Source/WebCore/Modules/fetch/FetchResponse.cpp:217 >> + if (auto bodyLoader = WTFMove(m_bodyLoader)) > > I am not sure that just doing std::move is a resilient design in cases like this. Using std::exchange gives a stronger guarantee that m_bodyLoader will actually become null and likely generates identical code. I have used std::move for this in the past but I am less sure now than I was then. True. That said, we forked std::optional specifically to use this pattern.
youenn fablet
Comment 6 2019-04-22 13:28:50 PDT
Created attachment 367965 [details] Patch for landing
WebKit Commit Bot
Comment 7 2019-04-22 15:12:09 PDT
Comment on attachment 367965 [details] Patch for landing Clearing flags on attachment: 367965 Committed r244515: <https://trac.webkit.org/changeset/244515>
WebKit Commit Bot
Comment 8 2019-04-22 15:12:11 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.