-
Notifications
You must be signed in to change notification settings - Fork 883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace handwritten adblock rust FFI with CXX based FFI #17368
Conversation
df4cc08
to
31ffdcc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @DJAndries!! Love to see a diff with over 700 1500! lines net removed 😁
I'm gonna submit a followup review for specific APIs I think we can simplify further by removing more of the UTF-8 checks in places they shouldn't be necessary, but this should be enough to work with for now.
will squash before future merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Followed up commenting on the safety of all the APIs returning a result type - should be ok to clean up most of them!
Rebased and squashed |
a9a2053
to
cbdb136
Compare
7c0b1d7
to
98a70f3
Compare
looks like this is just about ready to go - @DJAndries do you mind rebasing? it looks like the only CI failure is from unrelated npm audits. cc @iefremov, we'll need your +1 too |
f37ab68
to
f4b4f79
Compare
(ctx->method == "GET" || ctx->method == "HEAD" || | ||
ctx->method == "OPTIONS")) { | ||
ctx->new_url_spec = rewritten_url; | ||
ctx->new_url_spec = std::string(adblock_result.rewritten_url.value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we can put this string into a variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
browser/net lgtm
# License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
# You can obtain one at https://mozilla.org/MPL/2.0/. | ||
|
||
group("rust_lib") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not the correct places for this directory. If we're adding support for things that will be used in ios then you should be using browser/core and browser/content to split things that can/cannot be used on ios
Resolves brave/brave-browser#22985
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Standard regression testing.