Skip to content
This repository has been archived by the owner. It is now read-only.

Only determine third-party when needed #188

Merged
merged 1 commit into from Mar 1, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Only determine third-party when needed

  • Loading branch information
bbondy committed Feb 28, 2019
commit 5179946a2edb46fe19eb1070e3c4b2455bf4c9b8
@@ -753,7 +753,8 @@ bool AdBlockClient::matches(const char* input, FilterOption contextOption,
const char *inputHost = getUrlHost(input, &inputHostLen);

int contextDomainLen = 0;
if (contextDomain) {
// If neither first party nor third party was specified, try to figure it out
if (contextDomain && !(contextOption & (FOThirdParty | FONotThirdParty))) {
contextDomainLen = static_cast<int>(strlen(contextDomain));
if (isThirdPartyHost(contextDomain, contextDomainLen,
inputHost, static_cast<int>(inputHostLen))) {
@@ -943,7 +944,8 @@ bool AdBlockClient::findMatchingFilters(const char *input,
const char *inputHost = getUrlHost(input, &inputHostLen);

int contextDomainLen = 0;
if (contextDomain) {
// If neither first party nor third party was specified, try to figure it out
if (contextDomain && !(contextOption & (FOThirdParty | FONotThirdParty))) {
contextDomainLen = static_cast<int>(strlen(contextDomain));
if (isThirdPartyHost(contextDomain, contextDomainLen,
inputHost, static_cast<int>(inputHostLen))) {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.