Bug 1273353 - Replace usage of deprecated JS String.proto.contains(). r?francois
MozReview-Commit-ID: 4ZCxGdoGs7n
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -5148,23 +5148,23 @@ var ErrorPageEventHandler = {
errorDoc.location = "about:home";
}
} else if (errorDoc.documentURI.startsWith("about:blocked")) {
// The event came from a button on a malware/phishing block page
// First check whether it's malware, phishing or unwanted, so that we
// can use the right strings/links
let bucketName = "";
let sendTelemetry = false;
- if (errorDoc.documentURI.contains("e=malwareBlocked")) {
+ if (errorDoc.documentURI.includes("e=malwareBlocked")) {
sendTelemetry = true;
bucketName = "WARNING_MALWARE_PAGE_";
- } else if (errorDoc.documentURI.contains("e=deceptiveBlocked")) {
+ } else if (errorDoc.documentURI.includes("e=deceptiveBlocked")) {
sendTelemetry = true;
bucketName = "WARNING_PHISHING_PAGE_";
- } else if (errorDoc.documentURI.contains("e=unwantedBlocked")) {
+ } else if (errorDoc.documentURI.includes("e=unwantedBlocked")) {
sendTelemetry = true;
bucketName = "WARNING_UNWANTED_PAGE_";
}
let nsISecTel = Ci.nsISecurityUITelemetry;
let isIframe = (errorDoc.defaultView.parent === errorDoc.defaultView);
bucketName += isIframe ? "TOP_" : "FRAME_";
let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].getService(Ci.nsIURLFormatter);