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

Unified Diff: compiled/filter/Filter.cpp

Issue 29385742: Issue 4127 - [emscripten] Convert subscription classes to C++ - Part 2 (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Rebased Created April 13, 2017, 1:01 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 | « compiled/filter/Filter.h ('k') | compiled/intrusive_ptr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/filter/Filter.cpp
===================================================================
--- a/compiled/filter/Filter.cpp
+++ b/compiled/filter/Filter.cpp
@@ -118,37 +118,37 @@ Filter* Filter::FromText(DependentString
knownFilter->second->AddRef();
return knownFilter->second;
}
FilterPtr filter;
switch (type)
{
case Filter::Type::COMMENT:
- filter = new CommentFilter(text);
+ filter = FilterPtr(new CommentFilter(text), false);
break;
case Filter::Type::INVALID:
- filter = new InvalidFilter(text, error);
+ filter = FilterPtr(new InvalidFilter(text, error), false);
break;
case Filter::Type::BLOCKING:
- filter = new BlockingFilter(text, data.regexp);
+ filter = FilterPtr(new BlockingFilter(text, data.regexp), false);
break;
case Filter::Type::WHITELIST:
- filter = new WhitelistFilter(text, data.regexp);
+ filter = FilterPtr(new WhitelistFilter(text, data.regexp), false);
break;
case Filter::Type::ELEMHIDE:
- filter = new ElemHideFilter(text, data.elemhide);
+ filter = FilterPtr(new ElemHideFilter(text, data.elemhide), false);
break;
case Filter::Type::ELEMHIDEEXCEPTION:
- filter = new ElemHideException(text, data.elemhide);
+ filter = FilterPtr(new ElemHideException(text, data.elemhide), false);
break;
case Filter::Type::ELEMHIDEEMULATION:
- filter = new ElemHideEmulationFilter(text, data.elemhide);
+ filter = FilterPtr(new ElemHideEmulationFilter(text, data.elemhide), false);
if (static_cast<ElemHideEmulationFilter*>(filter.get())->IsGeneric())
- filter = new InvalidFilter(text, u"filter_elemhideemulation_nodomain"_str);
+ filter = FilterPtr(new InvalidFilter(text, u"filter_elemhideemulation_nodomain"_str), false);
break;
default:
// This should never happen but just in case
return nullptr;
}
// This is a hack: we looked up the entry using text but create it using
// filter->mText. This works because both are equal at this point. However,
« no previous file with comments | « compiled/filter/Filter.h ('k') | compiled/intrusive_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld