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

Unified Diff: lib/url.js

Issue 30011555: Issue 7303 - Deprecate the use of String.prototype.substr() (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Rebase Created Feb. 21, 2019, 2:48 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
« lib/filterClasses.js ('K') | « lib/rsa.js ('k') | test/_common.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/url.js
===================================================================
--- a/lib/url.js
+++ b/lib/url.js
@@ -66,17 +66,17 @@
*/
function* domainSuffixes(domain, includeBlank = false)
{
while (domain != "")
{
yield domain;
let dotIndex = domain.indexOf(".");
- domain = dotIndex == -1 ? "" : domain.substr(dotIndex + 1);
+ domain = dotIndex == -1 ? "" : domain.substring(dotIndex + 1);
Manish Jethani 2019/02/21 15:04:39 This is a hot spot, let's leave it as it is.
hub 2019/02/21 18:09:42 Done.
}
if (includeBlank)
yield "";
}
exports.domainSuffixes = domainSuffixes;
« lib/filterClasses.js ('K') | « lib/rsa.js ('k') | test/_common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld