Skip to content

Commit

Permalink
Add matchDebug() to uBO's proxy API (#2160)
Browse files Browse the repository at this point in the history
Related commit:
- #2156
  • Loading branch information
gorhill committed Aug 12, 2021
1 parent 3a62892 commit 34807aa
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/adblocker-benchmarks/blockers/ublock.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ module.exports = class UBlockOrigin {
return engine.deserialize(serialized);
}

match({ url, frameUrl, type }) {
return engine.matchRequest({ url, originURL: frameUrl, type }) === 1;
matchRequest({ url, frameUrl, type }) {
return engine.matchRequest({ url, originURL: frameUrl, type });
}

match(details) {
return this.matchRequest(details) === 1;
}

matchDebug(details) {
return this.matchRequest(details) !== 0 ? engine.toLogData().raw : null;
}
};

0 comments on commit 34807aa

Please sign in to comment.