Bug 197464 - Cache.add and Cache.addAll should compute a correct response body size
Summary: Cache.add and Cache.addAll should compute a correct response body size
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-05-01 08:50 PDT by youenn fablet
Modified: 2019-05-03 13:37 PDT (History)
6 users (show)

See Also:


Attachments
Patch (12.67 KB, patch)
2019-05-01 09:19 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (12.72 KB, patch)
2019-05-01 16:24 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (12.64 KB, patch)
2019-05-03 11:09 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews212 for win-future (13.75 MB, application/zip)
2019-05-03 13:06 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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>