[webkit-reviews] review granted: [Bug 190239] Ref<FetchResponse> use-after-move in DOMCache::put() : [Attachment 351492] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 3 02:43:47 PDT 2018


youenn fablet <youennf at gmail.com> has granted Zan Dobersek
<zan at falconsigh.net>'s request for review:
Bug 190239: Ref<FetchResponse> use-after-move in DOMCache::put()
https://bugs.webkit.org/show_bug.cgi?id=190239

Attachment 351492: Patch

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




--- Comment #3 from youenn fablet <youennf at gmail.com> ---
Comment on attachment 351492
  --> https://bugs.webkit.org/attachment.cgi?id=351492
Patch

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

> Source/WebCore/Modules/cache/DOMCache.cpp:354
> +	   responseRef.consumeBodyReceivedByChunk([promise = WTFMove(promise),
request = WTFMove(request), response = WTFMove(response), data =
SharedBuffer::create(), pendingActivity = makePendingActivity(*this),
this](auto&& result) mutable {

Is it really a bug on compilers?
Shouldn't they all do:
1. Call -> operator on the Ref<FetchResponse>
2. Call consumeBodyReceivedByChunk or move the Ref<FetchResponse> in the lambda
3. Move the Ref<FetchResponse> in the lambda or call consumeBodyReceivedByChunk


More information about the webkit-reviews mailing list