Bug 234713 - Content Filtering should be using SharedBuffer instead of copying its data
Summary: Content Filtering should be using SharedBuffer instead of copying its data
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jean-Yves Avenard [:jya]
URL:
Keywords: InRadar
Depends on: 232424
Blocks:
  Show dependency treegraph
 
Reported: 2021-12-27 18:48 PST by Jean-Yves Avenard [:jya]
Modified: 2022-01-06 08:36 PST (History)
29 users (show)

See Also:


Attachments
Patch For EWS (combined patch) (264.85 KB, patch)
2021-12-27 18:54 PST, Jean-Yves Avenard [:jya]
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch For Review (10.55 KB, patch)
2021-12-27 18:58 PST, Jean-Yves Avenard [:jya]
no flags Details | Formatted Diff | Diff
Patch For EWS (combined patch) (279.27 KB, patch)
2021-12-27 19:05 PST, Jean-Yves Avenard [:jya]
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch For Review (10.55 KB, patch)
2021-12-27 19:19 PST, Jean-Yves Avenard [:jya]
no flags Details | Formatted Diff | Diff
Patch For EWS (combined patch) (279.23 KB, patch)
2021-12-27 19:20 PST, Jean-Yves Avenard [:jya]
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for EWS testing (combined patch) (291.28 KB, patch)
2021-12-28 19:07 PST, Jean-Yves Avenard [:jya]
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch for EWS testing (combined patch) (286.10 KB, patch)
2021-12-28 19:32 PST, Jean-Yves Avenard [:jya]
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (10.53 KB, patch)
2022-01-06 05:45 PST, Jean-Yves Avenard [:jya]
no flags Details | Formatted Diff | Diff

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