Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop.

This commit is contained in:
Florian Quèze
2018-02-01 20:45:22 +01:00
parent 7e1a0e2b7f
commit c5f15a4700
614 changed files with 1231 additions and 1232 deletions

View File

@@ -32,10 +32,10 @@ MainProcessSingleton.prototype = {
// Make sure the URLs are HTTP, HTTPS, or FTP.
let isWeb = ["https", "http", "ftp"];
if (isWeb.indexOf(engineURL.scheme) < 0)
if (!isWeb.includes(engineURL.scheme))
throw "Unsupported search engine URL: " + engineURL;
if (iconURL && isWeb.indexOf(iconURL.scheme) < 0)
if (iconURL && !isWeb.includes(iconURL.scheme))
throw "Unsupported search icon URL: " + iconURL;
} catch (ex) {
Cu.reportError("Invalid argument passed to window.external.AddSearchProvider: " + ex);