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

Delta Between Two Patch Sets: compiled/library.js

Issue 29556737: Issue 5141 - Convert filter match to C++ (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Left Patch Set: Created Sept. 26, 2017, 9:34 p.m.
Right Patch Set: Fixed many issues. One test left out. Created Oct. 6, 2017, 1:45 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 var match = _regexp_data[id].exec(readString(str)); 96 var match = _regexp_data[id].exec(readString(str));
97 if (match) 97 if (match)
98 return match.index; 98 return match.index;
99 return -1; 99 return -1;
100 }, 100 },
101 101
102 MatchRegExp__deps: ["$_regexp_data"], 102 MatchRegExp__deps: ["$_regexp_data"],
103 MatchRegExp: function(id, str, reMatchResults) 103 MatchRegExp: function(id, str, reMatchResults)
104 { 104 {
105 var string = readString(str); 105 var string = readString(str);
106 var result = new exports.ReMatchResults(reMatchResults);
106 var matches = string.match(_regexp_data[id]); 107 var matches = string.match(_regexp_data[id]);
107 if (!matches) 108 if (!matches)
108 return false; 109 return false;
109 for (var i = 0; i < matches.length; i++) 110 for (var i = 0; i < matches.length; i++)
110 reMatchResults.push(createString(matches[i])); 111 result.push(matches[i]);
111 return true; 112 return true;
112 } 113 }
113 }); 114 });
LEFTRIGHT

Powered by Google App Engine
This is Rietveld