Bug 234713

Summary: Content Filtering should be using SharedBuffer instead of copying its data
Product: WebKit Reporter: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Component: New BugsAssignee: Jean-Yves Avenard [:jya] <jean-yves.avenard>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, calvaris, cdumez, cgarcia, dino, eric.carlson, ews-watchlist, fmalita, galpeter, glenn, gustavo, gyuyoung.kim, hi, japhet, jer.noble, joepeck, menard, pangle, pdr, philipj, pnormand, sabouhallawa, schenney, sergio, toyoshim, vjaquez, webkit-bug-importer, youennf, yutak
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 232424    
Bug Blocks:    
Attachments:
Description Flags
Patch For EWS (combined patch)
ews-feeder: commit-queue-
Patch For Review
none
Patch For EWS (combined patch)
ews-feeder: commit-queue-
Patch For Review
none
Patch For EWS (combined patch)
ews-feeder: commit-queue-
Patch for EWS testing (combined patch)
ews-feeder: commit-queue-
Patch for EWS testing (combined patch)
ews-feeder: commit-queue-
Patch none

Description Jean-Yves Avenard [:jya] 2021-12-27 18:48:36 PST
ContentFilter and NetworkExtensionContentFilter takes a const uint8_t*/int and have to copy the content into a separate buffer.

They could instead take a SharedBuffer which would avoid the above.
Comment 1 Radar WebKit Bug Importer 2021-12-27 18:49:01 PST
<rdar://problem/86947433>
Comment 2 Jean-Yves Avenard [:jya] 2021-12-27 18:54:59 PST
Created attachment 448019 [details]
Patch For EWS (combined patch)
Comment 3 Jean-Yves Avenard [:jya] 2021-12-27 18:58:09 PST
Created attachment 448020 [details]
Patch For Review
Comment 4 Jean-Yves Avenard [:jya] 2021-12-27 19:05:53 PST
Created attachment 448021 [details]
Patch For EWS (combined patch)
Comment 5 Jean-Yves Avenard [:jya] 2021-12-27 19:19:21 PST
Created attachment 448024 [details]
Patch For Review
Comment 6 Jean-Yves Avenard [:jya] 2021-12-27 19:20:31 PST
Created attachment 448025 [details]
Patch For EWS (combined patch)
Comment 7 Jean-Yves Avenard [:jya] 2021-12-28 19:07:59 PST
Created attachment 448062 [details]
Patch for EWS testing (combined patch)
Comment 8 Jean-Yves Avenard [:jya] 2021-12-28 19:32:15 PST
Created attachment 448063 [details]
Patch for EWS testing (combined patch)
Comment 9 youenn fablet 2022-01-06 04:09:00 PST
Comment on attachment 448024 [details]
Patch For Review

LGTM once bots are happy
View in context: https://bugs.webkit.org/attachment.cgi?id=448024&action=review

> Source/WebCore/loader/ContentFilter.cpp:154
> +        forEachContentFilterUntilBlocked([data = Ref { data }](PlatformContentFilter& contentFilter) {

s/PlatformContentFilter/auto/
Comment 10 Jean-Yves Avenard [:jya] 2022-01-06 05:45:46 PST
Created attachment 448491 [details]
Patch

Apply comment
Comment 11 EWS 2022-01-06 08:36:24 PST
Committed r287687 (245783@main): <https://commits.webkit.org/245783@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 448491 [details].