Cache API should return Abort error in case of putting an aborted fetch
<rdar://problem/49755566>
Created attachment 367093 [details] Patch
Looks like EWS is all green. Who should review this?
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.
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.
Created attachment 367965 [details] Patch for landing
Comment on attachment 367965 [details] Patch for landing Clearing flags on attachment: 367965 Committed r244515: <https://trac.webkit.org/changeset/244515>
All reviewed patches have been landed. Closing bug.