Bug 1273353 - Replace usage of deprecated JS String.proto.contains(). r?francois draft
authorGian-Carlo Pascutto <gcp@mozilla.com>
Tue, 17 May 2016 20:44:01 +0200
changeset 367945 5f3dd48c16994604a518c0382e4f5ba55b747461
parent 367838 3780a3a6b83aeda143f9562829c830410a0c961e
child 521139 a65c58d5c18ab164a79f566f7bbd7433d64ac7c8
push id18387
push usergpascutto@mozilla.com
push dateTue, 17 May 2016 18:44:19 +0000
reviewersfrancois
bugs1273353
milestone49.0a1
Bug 1273353 - Replace usage of deprecated JS String.proto.contains(). r?francois MozReview-Commit-ID: 4ZCxGdoGs7n
mobile/android/chrome/content/browser.js
--- 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);