Bug 197464

Summary: Cache.add and Cache.addAll should compute a correct response body size
Product: WebKit Reporter: youenn fablet <youennf>
Component: Service WorkersAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, cdumez, commit-queue, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing
none
Archive of layout-test-results from ews212 for win-future none

Description youenn fablet 2019-05-01 08:50:53 PDT
Cache.add and Cache.addAll should compute a correct response body size
Comment 1 youenn fablet 2019-05-01 09:19:30 PDT
Created attachment 368676 [details]
Patch
Comment 2 youenn fablet 2019-05-01 16:24:28 PDT
Created attachment 368730 [details]
Patch
Comment 3 Chris Dumez 2019-05-03 08:40:13 PDT
Comment on attachment 368730 [details]
Patch

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

> Source/WebCore/Modules/cache/DOMCache.cpp:179
> +        DOMCacheEngine::ResponseBody body = WTFMove(data);

Does not seem like we need this local variable.

> Source/WebCore/Modules/cache/DOMCache.cpp:180
> +        record.responseBodySize = m_domCache->connection().computeRecordBodySize(response, body);

s/body/data

> Source/WebCore/Modules/cache/DOMCache.cpp:181
> +        record.responseBody = WTFMove(body);

s/body/data

> Source/WebCore/Modules/cache/DOMCache.cpp:237
> +    auto taskHandler = FetchTasksHandler::create(makeRef(*this), [this, promise = WTFMove(promise)](ExceptionOr<Vector<Record>>&& result) mutable {

s/makeRef(*this)/*this
Comment 4 youenn fablet 2019-05-03 11:09:20 PDT
Created attachment 368953 [details]
Patch for landing
Comment 5 EWS Watchlist 2019-05-03 13:06:32 PDT
Comment on attachment 368953 [details]
Patch for landing

Attachment 368953 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12090360

New failing tests:
svg/repaint/add-background-property-on-root.html
svg/repaint/remove-background-property-on-root.html
svg/repaint/remove-border-property-on-root.html
svg/repaint/change-background-color.html
svg/repaint/add-border-property-on-root.html
Comment 6 EWS Watchlist 2019-05-03 13:06:37 PDT
Created attachment 368970 [details]
Archive of layout-test-results from ews212 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews212  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 7 youenn fablet 2019-05-03 13:09:15 PDT
Win error unrelated
Comment 8 WebKit Commit Bot 2019-05-03 13:36:44 PDT
Comment on attachment 368953 [details]
Patch for landing

Clearing flags on attachment: 368953

Committed r244918: <https://trac.webkit.org/changeset/244918>
Comment 9 WebKit Commit Bot 2019-05-03 13:36:46 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Radar WebKit Bug Importer 2019-05-03 13:37:24 PDT
<rdar://problem/50455076>