Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user