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

Unified Diff: compiled/ElemHide.cpp

Issue 29695640: Issue 6281 - Don't return deleted entries (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Remove mistakenly added characters. Created Feb. 13, 2018, 3:08 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | compiled/ElemHideEmulation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/ElemHide.cpp
===================================================================
--- a/compiled/ElemHide.cpp
+++ b/compiled/ElemHide.cpp
@@ -178,22 +178,19 @@
{
if (!mUnconditionalSelectorsCache)
{
mUnconditionalSelectorsCache =
intrusive_ptr<ElemHide_SelectorList>(new ElemHide_SelectorList(), false);
annotate_address(mUnconditionalSelectorsCache.get(), "ElemHide_SelectorList");
for (const auto& unconditional : mUnconditionalSelectors)
{
- if (!(unconditional.is_deleted() || unconditional.is_invalid()))
- {
- auto entry = mFilters.find(unconditional.second->GetText());
- if (entry)
- mUnconditionalSelectorsCache->push_back(entry->second);
- }
+ auto entry = mFilters.find(unconditional.second->GetText());
+ if (entry)
+ mUnconditionalSelectorsCache->push_back(entry->second);
}
}
return intrusive_ptr<ElemHide_SelectorList>(mUnconditionalSelectorsCache).release();
}
ElemHide_SelectorList* ElemHide::GetSelectorsForDomain(const String& domain,
Criteria criteria) const
{
@@ -216,19 +213,16 @@
if (specificOnly && currentDomain.empty())
break;
auto filters = mFiltersByDomain.find(currentDomain);
if (filters)
{
for (const auto& entry : filters->second)
{
- if (entry.first.is_invalid() || entry.first.is_deleted())
- continue;
-
if (seenFilters.find(entry.first))
continue;
seenFilters.insert(entry.first);
auto filter = entry.second;
if (filter && !GetException(*filter, docDomain))
selectors->push_back(filter);
}
« no previous file with comments | « no previous file | compiled/ElemHideEmulation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld