Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: compiled/ElemHideEmulation.cpp

Issue 29695640: Issue 6281 - Don't return deleted entries (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Feb. 12, 2018, 11:52 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 23 matching lines...) Expand all
34 { 34 {
35 mFilters.clear(); 35 mFilters.clear();
36 } 36 }
37 37
38 ElemHideEmulation_FilterList* ElemHideEmulation::GetRulesForDomain(const ElemHid e& elemHide, DependentString& domain) 38 ElemHideEmulation_FilterList* ElemHideEmulation::GetRulesForDomain(const ElemHid e& elemHide, DependentString& domain)
39 { 39 {
40 intrusive_ptr<ElemHideEmulation_FilterList> result(new ElemHideEmulation_Filte rList()); 40 intrusive_ptr<ElemHideEmulation_FilterList> result(new ElemHideEmulation_Filte rList());
41 for (const auto& entry: mFilters) 41 for (const auto& entry: mFilters)
42 { 42 {
43 DependentString docDomain(domain); 43 DependentString docDomain(domain);
44 if (!(entry.is_deleted() || entry.is_invalid()) && 44 if (entry.second->IsActiveOnDomain(docDomain) &&
45 entry.second->IsActiveOnDomain(docDomain) &&
46 !elemHide.GetException(*entry.second, domain)) 45 !elemHide.GetException(*entry.second, domain))
47 result->push_back(entry.second); 46 result->push_back(entry.second);
48 } 47 }
49 48
50 return result.release(); 49 return result.release();
51 } 50 }
OLDNEW
« no previous file with comments | « compiled/ElemHide.cpp ('k') | compiled/Map.h » ('j') | test/compiled/StringMap.cpp » ('J')

Powered by Google App Engine
This is Rietveld