[webkit-reviews] review granted: [Bug 196757] Cache API should return Abort error in case of putting an aborted fetch : [Attachment 367093] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Apr 13 13:49:42 PDT 2019


Darin Adler <darin at apple.com> has granted youenn fablet <youennf at gmail.com>'s
request for review:
Bug 196757: Cache API should return Abort error in case of putting an aborted
fetch
https://bugs.webkit.org/show_bug.cgi?id=196757

Attachment 367093: Patch

https://bugs.webkit.org/attachment.cgi?id=367093&action=review




--- Comment #4 from Darin Adler <darin at apple.com> ---
Comment on attachment 367093
  --> https://bugs.webkit.org/attachment.cgi?id=367093
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.


More information about the webkit-reviews mailing list