From 3f04a0175b4029867ed6d7c220ea94edef1a9b3d Mon Sep 17 00:00:00 2001 From: Anton Lazarev Date: Fri, 11 Dec 2020 01:12:32 -0500 Subject: [PATCH] update adblock-rust to v0.3.4 --- DEPS | 2 +- build/rust/Cargo.lock | 39 +++++++++++++------ .../browser/ad_block_base_service.cc | 10 ++--- 3 files changed, 32 insertions(+), 19 deletions(-) diff --git a/DEPS b/DEPS index 139354b23a17..b609c6f860c7 100644 --- a/DEPS +++ b/DEPS @@ -1,7 +1,7 @@ use_relative_paths = True deps = { - "vendor/adblock_rust_ffi": "https://github.com/brave/adblock-rust-ffi.git@a6342c37be1618627395ce6241d36a291e2da72f", + "vendor/adblock_rust_ffi": "https://github.com/brave/adblock-rust-ffi.git@496ca6987be657f1f315239f2830ac4a12b2aa69", "vendor/extension-whitelist": "https://github.com/brave/extension-whitelist.git@b4d059c73042cacf3a5e9156d4b1698e7bc18678", "vendor/hashset-cpp": "https://github.com/brave/hashset-cpp.git@6eab0271d014ff09bd9f38abe1e0c117e13e9aa9", "vendor/requests": "https://github.com/kennethreitz/requests@e4d59bedfd3c7f4f254f4f5d036587bcd8152458", diff --git a/build/rust/Cargo.lock b/build/rust/Cargo.lock index bc0763de6329..df0e741d25da 100644 --- a/build/rust/Cargo.lock +++ b/build/rust/Cargo.lock @@ -12,7 +12,7 @@ dependencies = [ "flate2", "hashbrown", "idna 0.2.0", - "itertools", + "itertools 0.8.2", "lazy_static", "lifeguard", "matches", @@ -29,14 +29,14 @@ dependencies = [ [[package]] name = "adblock" -version = "0.3.2" -source = "git+https://github.com/brave/adblock-rust?rev=a54fcc29c3d904ffaf438501efe7708caaab4483#a54fcc29c3d904ffaf438501efe7708caaab4483" +version = "0.3.3" +source = "git+https://github.com/brave/adblock-rust?rev=dbb0bee71faa6f1812888638dae3559e91008382#dbb0bee71faa6f1812888638dae3559e91008382" dependencies = [ - "base64 0.10.1", + "base64 0.13.0", "bitflags", "flate2", "idna 0.2.0", - "itertools", + "itertools 0.9.0", "lifeguard", "once_cell", "percent-encoding 2.1.0", @@ -52,7 +52,7 @@ dependencies = [ name = "adblock-ffi" version = "0.1.0" dependencies = [ - "adblock 0.3.2", + "adblock 0.3.3", "libc", "serde_json", ] @@ -149,6 +149,12 @@ dependencies = [ "byteorder", ] +[[package]] +name = "base64" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" + [[package]] name = "bitflags" version = "1.2.1" @@ -552,6 +558,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.4.6" @@ -724,9 +739,9 @@ checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" [[package]] name = "once_cell" -version = "1.4.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" +checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" [[package]] name = "opaque-debug" @@ -1141,9 +1156,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "regex" -version = "1.3.9" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" +checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c" dependencies = [ "aho-corasick", "memchr", @@ -1153,9 +1168,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.18" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" +checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189" [[package]] name = "remove_dir_all" diff --git a/components/brave_shields/browser/ad_block_base_service.cc b/components/brave_shields/browser/ad_block_base_service.cc index 86f8ec652637..c3255d04c781 100644 --- a/components/brave_shields/browser/ad_block_base_service.cc +++ b/components/brave_shields/browser/ad_block_base_service.cc @@ -128,13 +128,11 @@ bool AdBlockBaseService::ShouldStartRequest( url, url::Origin::CreateFromNormalizedTuple("https", tab_host.c_str(), 80), INCLUDE_PRIVATE_REGISTRIES); - // TODO(spinda): Remove explicit_cancel here when removed from adblock-rust. - bool explicit_cancel; bool saved_from_exception; - if (ad_block_client_->matches( - url.spec(), url.host(), tab_host, is_third_party, - ResourceTypeToString(resource_type), &explicit_cancel, - &saved_from_exception, mock_data_url)) { + if (ad_block_client_->matches(url.spec(), url.host(), tab_host, + is_third_party, + ResourceTypeToString(resource_type), + &saved_from_exception, mock_data_url)) { // We'd only possibly match an exception filter if we're returning true. if (did_match_exception) { *did_match_exception = false;