Index: compiled/filter/Filter.cpp |
=================================================================== |
--- a/compiled/filter/Filter.cpp |
+++ b/compiled/filter/Filter.cpp |
@@ -101,37 +101,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, |