Bug 226943

Summary: Use SharedBuffer!=() in CachedResource::tryReplaceEncodedData()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, darin, ews-watchlist, ggaren, japhet, koivisto, sam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2021-06-11 15:27:44 PDT
Use SharedBuffer!=() in CachedResource::tryReplaceEncodedData() instead of duplicating its logic. SharedBuffer==() is also potentially more efficient since it doesn't requires combining the SharedBuffers' data segments.
Comment 1 Chris Dumez 2021-06-11 15:29:14 PDT
Created attachment 431235 [details]
Patch
Comment 2 Geoffrey Garen 2021-06-11 15:32:06 PDT
Comment on attachment 431235 [details]
Patch

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

r=me

> Source/WebCore/loader/cache/CachedResource.cpp:917
> +    // We have to do the compare the buffers because we can't tell if the replacement file backed data is for the

to do the compare the buffers => compare the buffers
Comment 3 Chris Dumez 2021-06-11 15:33:30 PDT
Created attachment 431236 [details]
Patch
Comment 4 EWS 2021-06-11 16:36:40 PDT
Committed r278793 (238750@main): <https://commits.webkit.org/238750@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431236 [details].
Comment 5 Radar WebKit Bug Importer 2021-06-11 16:37:19 PDT
<rdar://problem/79222229>