brave / adblock-rust-ffi

An FFI crate to expose functionality from brave/adblock-rust
Mozilla Public License 2.0
47 stars 16 forks source link

Report exception/important matches through `engine.matches` API #4

Closed antonok-edm closed 3 years ago

antonok-edm commented 5 years ago

This introduces a new boolean output argument to engine.matches that represents whether or not a matched network filter is important.

Additionally, this changes saved_from_exception to just did_match_exception and uses true as the return value only when a filter matches. This way, it's possible to determine whether or not an exception matched even if no filter was matched.

Depends on changes from brave/adblock-rust/pull/42

Intended as part of the fix for brave/brave-browser#5440