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

Unified Diff: compiled/filter/RegExpFilter.cpp

Issue 29556737: Issue 5141 - Convert filter match to C++ (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Fixed many issues. One test left out. Created Oct. 6, 2017, 1:45 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
Index: compiled/filter/RegExpFilter.cpp
===================================================================
--- a/compiled/filter/RegExpFilter.cpp
+++ b/compiled/filter/RegExpFilter.cpp
@@ -310,17 +310,17 @@
if (!error.empty())
return Type::INVALID;
if (data.mPatternEnd - data.mPatternStart >= 2 &&
text[data.mPatternStart] == u'/' &&
text[data.mPatternEnd - 1] == u'/')
{
data.SetRegExp(GenerateRegExp(DependentString(text, data.mPatternStart + 1,
- data.mPatternEnd - data.mPatternStart - 2), data.mMatchCase));
+ data.mPatternEnd - data.mPatternStart - 2), data.mMatchCase, false));
if (data.mRegexpId == -1)
{
error.reset(u"filter_invalid_regexp"_str);
return Type::INVALID;
}
}
return type;
@@ -386,12 +386,12 @@
!IsActiveOnDomain(docDomain, sitekey))
{
return false;
}
if (!mData.RegExpParsingDone())
{
const OwnedString pattern(mData.GetRegExpSource(mText));
- mData.SetRegExp(GenerateRegExp(RegExpFromSource(pattern), mData.mMatchCase));
+ mData.SetRegExp(GenerateRegExp(RegExpFromSource(pattern), mData.mMatchCase, false));
}
return TestRegExp(mData.mRegexpId, location);
}

Powered by Google App Engine
This is Rietveld