From e84f5456a1bf45afa9c318e0c38bb07e56b74d06 Mon Sep 17 00:00:00 2001 From: Anton Lazarev Date: Tue, 6 Aug 2024 20:50:25 -0700 Subject: [PATCH] update adblock-rust to v0.8.12 --- .../brave_shields/adblock/rs/Cargo.toml | 2 +- third_party/rust/adblock/v0_8/BUILD.gn | 50 ++++++------ third_party/rust/adblock/v0_8/README.chromium | 6 +- .../rust/chromium_crates_io/Cargo.lock | 2 +- .../adblock-0.8.11/.cargo_vcs_info.json | 6 -- .../.cargo-checksum.json | 0 .../adblock-0.8.12/.cargo_vcs_info.json | 6 ++ .../Cargo.lock | 76 ++++++------------- .../Cargo.toml | 7 +- .../Cargo.toml.orig | 6 +- .../LICENSE | 0 .../README.md | 0 .../benches/bench_cosmetic_matching.rs | 0 .../benches/bench_matching.rs | 0 .../benches/bench_redirect_performance.rs | 0 .../benches/bench_regex.rs | 0 .../benches/bench_rules.rs | 0 .../benches/bench_url.rs | 0 .../rust-toolchain.toml | 0 .../src/blocker.rs | 0 .../src/content_blocking.rs | 0 .../src/cosmetic_filter_cache.rs | 0 .../src/data_format/mod.rs | 0 .../src/data_format/utils.rs | 0 .../src/data_format/v0.rs | 0 .../src/engine.rs | 0 .../src/filters/cosmetic.rs | 9 ++- .../src/filters/mod.rs | 0 .../src/filters/network.rs | 0 .../src/lib.rs | 0 .../src/lists.rs | 0 .../src/optimizer.rs | 14 +++- .../src/regex_manager.rs | 6 +- .../src/request.rs | 0 .../src/resources/mod.rs | 0 .../src/resources/resource_assembler.rs | 0 .../src/resources/resource_storage.rs | 0 .../src/url_parser/mod.rs | 0 .../src/url_parser/parser.rs | 17 ++--- .../src/url_parser/parser_full.rs | 0 .../src/url_parser/parser_regex.rs | 0 .../src/utils.rs | 0 42 files changed, 91 insertions(+), 116 deletions(-) delete mode 100644 third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/.cargo_vcs_info.json rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/.cargo-checksum.json (100%) create mode 100644 third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/.cargo_vcs_info.json rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/Cargo.lock (96%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/Cargo.toml (97%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/Cargo.toml.orig (94%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/LICENSE (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/README.md (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/benches/bench_cosmetic_matching.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/benches/bench_matching.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/benches/bench_redirect_performance.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/benches/bench_regex.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/benches/bench_rules.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/benches/bench_url.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/rust-toolchain.toml (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/blocker.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/content_blocking.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/cosmetic_filter_cache.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/data_format/mod.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/data_format/utils.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/data_format/v0.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/engine.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/filters/cosmetic.rs (99%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/filters/mod.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/filters/network.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/lib.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/lists.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/optimizer.rs (98%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/regex_manager.rs (98%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/request.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/resources/mod.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/resources/resource_assembler.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/resources/resource_storage.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/url_parser/mod.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/url_parser/parser.rs (97%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/url_parser/parser_full.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/url_parser/parser_regex.rs (100%) rename third_party/rust/chromium_crates_io/vendor/{adblock-0.8.11 => adblock-0.8.12}/src/utils.rs (100%) diff --git a/components/brave_shields/adblock/rs/Cargo.toml b/components/brave_shields/adblock/rs/Cargo.toml index 0cb19f14d787..dc90857dcaa2 100644 --- a/components/brave_shields/adblock/rs/Cargo.toml +++ b/components/brave_shields/adblock/rs/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MPL-2.0" [dependencies] -adblock = { version = "0.8.11", default-features = false, features = ["full-regex-handling", "regex-debug-info", "css-validation"] } +adblock = { version = "0.8.12", default-features = false, features = ["full-regex-handling", "regex-debug-info", "css-validation"] } cxx = "1.0" serde_json = "1.0" thiserror = "1.0" diff --git a/third_party/rust/adblock/v0_8/BUILD.gn b/third_party/rust/adblock/v0_8/BUILD.gn index 4c2e0cd22248..f7bd64445d00 100644 --- a/third_party/rust/adblock/v0_8/BUILD.gn +++ b/third_party/rust/adblock/v0_8/BUILD.gn @@ -13,37 +13,37 @@ cargo_crate("lib") { crate_name = "adblock" epoch = "0.8" crate_type = "rlib" - crate_root = "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/lib.rs" + crate_root = "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/lib.rs" sources = [ - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/blocker.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/content_blocking.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/cosmetic_filter_cache.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/data_format/mod.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/data_format/utils.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/data_format/v0.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/engine.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/filters/cosmetic.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/filters/mod.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/filters/network.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/lib.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/lists.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/optimizer.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/regex_manager.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/request.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/resources/mod.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/resources/resource_assembler.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/resources/resource_storage.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/mod.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/parser.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/parser_full.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/parser_regex.rs", - "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/utils.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/blocker.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/content_blocking.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/cosmetic_filter_cache.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/data_format/mod.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/data_format/utils.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/data_format/v0.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/engine.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/filters/cosmetic.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/filters/mod.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/filters/network.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/lib.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/lists.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/optimizer.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/regex_manager.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/request.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/resources/mod.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/resources/resource_assembler.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/resources/resource_storage.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/mod.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/parser.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/parser_full.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/parser_regex.rs", + "//brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/utils.rs", ] inputs = [] build_native_rust_unit_tests = false edition = "2021" - cargo_pkg_version = "0.8.11" + cargo_pkg_version = "0.8.12" cargo_pkg_authors = "Anton Lazarev , Andrius Aucinas" cargo_pkg_name = "adblock" cargo_pkg_description = "Native Rust module for Adblock Plus syntax (e.g. EasyList, EasyPrivacy) filter parsing and matching." diff --git a/third_party/rust/adblock/v0_8/README.chromium b/third_party/rust/adblock/v0_8/README.chromium index e1d24ae7bac0..af834f59d2eb 100644 --- a/third_party/rust/adblock/v0_8/README.chromium +++ b/third_party/rust/adblock/v0_8/README.chromium @@ -1,9 +1,9 @@ Name: adblock URL: https://crates.io/crates/adblock Description: Native Rust module for Adblock Plus syntax (e.g. EasyList, EasyPrivacy) filter parsing and matching. -Version: 0.8.11 +Version: 0.8.12 Security Critical: yes Shipped: yes License: Mozilla Public License 2.0 -License File: //brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/LICENSE -Revision: fa1cd7df0a22cc891c103260d2ecdf0d4719e6ac +License File: //brave/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/LICENSE +Revision: e01430a534b64163e16590290bbf4df6218d16aa diff --git a/third_party/rust/chromium_crates_io/Cargo.lock b/third_party/rust/chromium_crates_io/Cargo.lock index ecdb453f7ecb..9ee765e20d49 100644 --- a/third_party/rust/chromium_crates_io/Cargo.lock +++ b/third_party/rust/chromium_crates_io/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "adblock" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "base64", diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/.cargo_vcs_info.json b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/.cargo_vcs_info.json deleted file mode 100644 index 5bca0970a075..000000000000 --- a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "fa1cd7df0a22cc891c103260d2ecdf0d4719e6ac" - }, - "path_in_vcs": "" -} \ No newline at end of file diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/.cargo-checksum.json b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/.cargo-checksum.json similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/.cargo-checksum.json rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/.cargo-checksum.json diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/.cargo_vcs_info.json b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/.cargo_vcs_info.json new file mode 100644 index 000000000000..0d10d7f24664 --- /dev/null +++ b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "e01430a534b64163e16590290bbf4df6218d16aa" + }, + "path_in_vcs": "" +} \ No newline at end of file diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/Cargo.lock b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/Cargo.lock similarity index 96% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/Cargo.lock rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/Cargo.lock index 01208312e31d..a359e37a5c3d 100644 --- a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/Cargo.lock +++ b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "adblock" -version = "0.8.11" +version = "0.8.12" dependencies = [ "addr", "base64 0.13.0", @@ -35,9 +35,9 @@ dependencies = [ [[package]] name = "addr" -version = "0.14.0" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54ccac949a2afafdfc889e15c753bbc6ee8783e026bbe3d057b00b13907db70" +checksum = "a93b8a41dbe230ad5087cc721f8d41611de654542180586b315d9f4cf6b72bef" dependencies = [ "psl", "psl-types", @@ -97,18 +97,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bstr" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" -dependencies = [ - "lazy_static", - "memchr", - "regex-automata", - "serde", -] - [[package]] name = "bumpalo" version = "3.12.0" @@ -341,22 +329,21 @@ dependencies = [ [[package]] name = "csv" -version = "1.1.6" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" dependencies = [ - "bstr", "csv-core", - "itoa 0.4.8", + "itoa 1.0.3", "ryu", "serde", ] [[package]] name = "csv-core" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" dependencies = [ "memchr", ] @@ -760,12 +747,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - [[package]] name = "libc" version = "0.2.150" @@ -828,12 +809,9 @@ dependencies = [ [[package]] name = "mock_instant" -version = "0.2.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "717e29a243b81f8130e31e24e04fb151b04a44b5a7d05370935f7d937e9de06d" -dependencies = [ - "once_cell", -] +checksum = "cdcebb6db83796481097dedc7747809243cc81d9ed83e6a938b76d4ea0b249cf" [[package]] name = "nodrop" @@ -862,9 +840,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.14.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oorandom" @@ -1121,12 +1099,6 @@ dependencies = [ "regex-syntax", ] -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" - [[package]] name = "regex-syntax" version = "0.6.27" @@ -1327,29 +1299,29 @@ checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" [[package]] name = "serde" -version = "1.0.144" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.144" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 1.0.99", + "syn 2.0.61", ] [[package]] name = "serde_json" -version = "1.0.85" +version = "1.0.117" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" dependencies = [ "itoa 1.0.3", "ryu", @@ -1485,22 +1457,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 1.0.99", + "syn 2.0.61", ] [[package]] diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/Cargo.toml b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/Cargo.toml similarity index 97% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/Cargo.toml rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/Cargo.toml index 064da8ae0db1..61fa6eeb9b19 100644 --- a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/Cargo.toml +++ b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/Cargo.toml @@ -12,7 +12,7 @@ [package] edition = "2021" name = "adblock" -version = "0.8.11" +version = "0.8.12" authors = [ "Anton Lazarev ", "Andrius Aucinas", @@ -58,7 +58,7 @@ name = "bench_redirect_performance" harness = false [dependencies.addr] -version = "0.14" +version = "0.15" features = ["psl"] optional = true default-features = false @@ -132,8 +132,7 @@ version = "1" version = "0.3" [dev-dependencies.mock_instant] -version = "0.2" -features = ["sync"] +version = "0.5" [dev-dependencies.reqwest] version = "0.11" diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/Cargo.toml.orig b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/Cargo.toml.orig similarity index 94% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/Cargo.toml.orig rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/Cargo.toml.orig index 64adb020f581..b402ea2a2ce5 100644 --- a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/Cargo.toml.orig +++ b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "adblock" -version = "0.8.11" +version = "0.8.12" authors = ["Anton Lazarev ", "Andrius Aucinas"] edition = "2021" @@ -23,7 +23,7 @@ exclude = [ ] [dependencies] -addr = { version = "0.14", default-features = false, features = ["psl"], optional = true } +addr = { version = "0.15", default-features = false, features = ["psl"], optional = true } url = "2.2" percent-encoding = "2.1" once_cell = "1.8" @@ -45,7 +45,7 @@ thiserror = "1.0" [dev-dependencies] criterion = "0.5" csv = "1" -mock_instant = { version = "0.2", features = ["sync"] } +mock_instant = { version = "0.5" } serde_json = "1.0" # By default, reqwest builds openssl from source, which fails on missing/incompatible system dependencies reqwest = { version = "0.11", features = ["rustls-tls"], default-features = false } diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/LICENSE b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/LICENSE similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/LICENSE rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/LICENSE diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/README.md b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/README.md similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/README.md rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/README.md diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/benches/bench_cosmetic_matching.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/benches/bench_cosmetic_matching.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/benches/bench_cosmetic_matching.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/benches/bench_cosmetic_matching.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/benches/bench_matching.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/benches/bench_matching.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/benches/bench_matching.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/benches/bench_matching.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/benches/bench_redirect_performance.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/benches/bench_redirect_performance.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/benches/bench_redirect_performance.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/benches/bench_redirect_performance.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/benches/bench_regex.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/benches/bench_regex.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/benches/bench_regex.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/benches/bench_regex.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/benches/bench_rules.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/benches/bench_rules.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/benches/bench_rules.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/benches/bench_rules.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/benches/bench_url.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/benches/bench_url.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/benches/bench_url.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/benches/bench_url.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/rust-toolchain.toml b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/rust-toolchain.toml similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/rust-toolchain.toml rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/rust-toolchain.toml diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/blocker.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/blocker.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/blocker.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/blocker.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/content_blocking.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/content_blocking.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/content_blocking.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/content_blocking.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/cosmetic_filter_cache.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/cosmetic_filter_cache.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/cosmetic_filter_cache.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/cosmetic_filter_cache.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/data_format/mod.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/data_format/mod.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/data_format/mod.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/data_format/mod.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/data_format/utils.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/data_format/utils.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/data_format/utils.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/data_format/utils.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/data_format/v0.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/data_format/v0.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/data_format/v0.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/data_format/v0.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/engine.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/engine.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/engine.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/engine.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/filters/cosmetic.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/filters/cosmetic.rs similarity index 99% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/filters/cosmetic.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/filters/cosmetic.rs index 61beaef4e84e..527ab6a67aba 100644 --- a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/filters/cosmetic.rs +++ b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/filters/cosmetic.rs @@ -791,11 +791,11 @@ mod css_validation { type ExtraMatchingData = (); type AttrValue = CssString; type Identifier = CssIdent; - type LocalName = DummyValue; + type LocalName = CssString; type NamespaceUrl = DummyValue; type NamespacePrefix = DummyValue; type BorrowedNamespaceUrl = DummyValue; - type BorrowedLocalName = DummyValue; + type BorrowedLocalName = CssString; type NonTSPseudoClass = NonTSPseudoClass; type PseudoElement = PseudoElement; } @@ -915,6 +915,11 @@ mod css_validation { // opening comment to match it. assert!(validate_css_selector(r#"input[x="*/{}*{background:url(https://hackvertor.co.uk/images/logo.gif)}"]"#, false).is_some()); } + + #[test] + fn escaped_quote_in_tag_name() { + assert_eq!(validate_css_selector(r#"head\""#, false), Some(r#"head\""#.to_string())); + } } static RE_PLAIN_SELECTOR: Lazy = Lazy::new(|| Regex::new(r"^[#.][\w\\-]+").unwrap()); diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/filters/mod.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/filters/mod.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/filters/mod.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/filters/mod.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/filters/network.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/filters/network.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/filters/network.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/filters/network.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/lib.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/lib.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/lib.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/lib.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/lists.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/lists.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/lists.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/lists.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/optimizer.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/optimizer.rs similarity index 98% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/optimizer.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/optimizer.rs index 04fd7256046c..986e29fe663c 100644 --- a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/optimizer.rs +++ b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/optimizer.rs @@ -1,6 +1,6 @@ use crate::filters::network::{FilterPart, NetworkFilter, NetworkFilterMask}; use itertools::*; -use std::collections::{HashMap, HashSet}; +use std::collections::HashMap; trait Optimization { fn fusion(&self, filters: &[NetworkFilter]) -> NetworkFilter; @@ -12,9 +12,11 @@ trait Optimization { pub fn optimize(filters: Vec) -> Vec { let mut optimized: Vec = Vec::new(); - // let union_domain_group = UnionDomainGroup {}; - // let (mut fused, unfused) = apply_optimisation(&union_domain_group, filters); - // optimized.append(&mut fused); + /* + let union_domain_group = UnionDomainGroup {}; + let (mut fused, unfused) = apply_optimisation(&union_domain_group, filters); + optimized.append(&mut fused); + */ let simple_pattern_group = SimplePatternGroup {}; let (mut fused, mut unfused) = apply_optimisation(&simple_pattern_group, filters); @@ -133,6 +135,7 @@ impl Optimization for SimplePatternGroup { } } +/* struct UnionDomainGroup {} impl Optimization for UnionDomainGroup { @@ -196,6 +199,7 @@ impl Optimization for UnionDomainGroup { !filter.is_csp() && (filter.opt_domains.is_some() || filter.opt_not_domains.is_some()) } } +*/ #[cfg(test)] mod optimization_tests_pattern_group { @@ -376,6 +380,7 @@ mod optimization_tests_pattern_group { } } +/* #[cfg(test)] mod optimization_tests_union_domain { use super::*; @@ -519,3 +524,4 @@ mod optimization_tests_union_domain { ); } } +*/ diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/regex_manager.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/regex_manager.rs similarity index 98% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/regex_manager.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/regex_manager.rs index 6e65555eaf47..258f13ce25d8 100644 --- a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/regex_manager.rs +++ b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/regex_manager.rs @@ -1,4 +1,4 @@ -//! Compiled regexes can take up large amounts of memory. To reduce the overal memory footprint of +//! Compiled regexes can take up large amounts of memory. To reduce the overall memory footprint of //! the [`crate::Engine`], infrequently used regexes can be discarded. The [`RegexManager`] is //! responsible for managing the storage of regexes used by filters. @@ -9,7 +9,7 @@ use std::time::Duration; #[cfg(test)] #[cfg(not(target_arch = "wasm32"))] -use mock_instant::Instant; +use mock_instant::global::Instant; #[cfg(not(test))] #[cfg(not(target_arch = "wasm32"))] use std::time::Instant; @@ -232,7 +232,7 @@ mod tests { use crate::filters::network::NetworkMatchable; use crate::request; - use mock_instant::MockClock; + use mock_instant::global::MockClock; fn make_filter(line: &str) -> NetworkFilter { NetworkFilter::parse(line, true, Default::default()).unwrap() diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/request.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/request.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/request.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/request.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/resources/mod.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/resources/mod.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/resources/mod.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/resources/mod.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/resources/resource_assembler.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/resources/resource_assembler.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/resources/resource_assembler.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/resources/resource_assembler.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/resources/resource_storage.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/resources/resource_storage.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/resources/resource_storage.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/resources/resource_storage.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/mod.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/mod.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/mod.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/mod.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/parser.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/parser.rs similarity index 97% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/parser.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/parser.rs index 0346b77f99ac..4653d8865359 100644 --- a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/parser.rs +++ b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/parser.rs @@ -32,14 +32,13 @@ pub(crate) const USERINFO: &AsciiSet = &PATH .add(b'|'); #[derive(Clone)] -pub struct Hostname { +pub(super) struct Hostname { serialization: String, // Components - pub scheme_end: usize, // Before ':' - pub username_end: usize, // Before ':' (if a password is given) or '@' (if not) - pub host_start: usize, - pub host_end: usize, + pub(super) scheme_end: usize, // Before ':' + pub(super) host_start: usize, + pub(super) host_end: usize, } impl Hostname { @@ -193,9 +192,6 @@ simple_enum_error! { ExpectedMoreChars => "Expected more characters", } -#[cfg(feature = "heapsize")] -known_heap_size!(0, ParseError); - impl From for ParseError { fn from(_: idna::Errors) -> ParseError { ParseError::IdnaError @@ -391,7 +387,6 @@ impl Parser { } // Anarchist URL (no authority) let path_start = self.serialization.len(); - let username_end = path_start; let host_start = path_start; let host_end = path_start; self.serialization.push_str(input.chars.as_str()); @@ -404,7 +399,6 @@ impl Parser { Ok(Hostname { serialization: self.serialization, scheme_end, - username_end, host_start, host_end, }) @@ -418,7 +412,7 @@ impl Parser { ) -> ParseResult { self.serialization.push_str("//"); // authority state - let (username_end, remaining) = self.parse_userinfo(input, scheme_type)?; + let (_username_end, remaining) = self.parse_userinfo(input, scheme_type)?; // host state let host_start = self.serialization.len(); let (host_end, remaining) = self.parse_host(remaining, scheme_type)?; @@ -426,7 +420,6 @@ impl Parser { Ok(Hostname { serialization: self.serialization, scheme_end, - username_end, host_start, host_end, }) diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/parser_full.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/parser_full.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/parser_full.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/parser_full.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/parser_regex.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/parser_regex.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/url_parser/parser_regex.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/url_parser/parser_regex.rs diff --git a/third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/utils.rs b/third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/utils.rs similarity index 100% rename from third_party/rust/chromium_crates_io/vendor/adblock-0.8.11/src/utils.rs rename to third_party/rust/chromium_crates_io/vendor/adblock-0.8.12/src/utils.rs