Backed out changeset 34e24b0fb7b7 (bug 1522989) for ESLint failures.

This commit is contained in:
Dorel Luca 2019-01-26 06:08:50 +02:00
Родитель 69778e2f5f
Коммит a489431ca6
1 изменённых файлов: 3 добавлений и 10 удалений

Просмотреть файл

@ -13,19 +13,12 @@ ChromeUtils.import("resource://gre/modules/osfile.jsm");
// before they are called.
const progressListeners = new Map();
function loadContentWindow(webNavigation, url, principal) {
let uri;
try {
uri = Services.io.newURI(url);
} catch (e) {
Cu.reportError(`Invalid URL passed to loadContentWindow(): ${url}`);
return;
}
function loadContentWindow(webNavigation, uri, principal) {
return new Promise((resolve, reject) => {
let loadURIOptions = {
triggeringPrincipal: principal,
};
webNavigation.loadURI(uri.spec, loadURIOptions);
webNavigation.loadURI(uri, loadURIOptions);
let docShell = webNavigation.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDocShell);
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
@ -41,7 +34,7 @@ function loadContentWindow(webNavigation, url, principal) {
return;
}
// Ignore the initial about:blank
if (uri.spec != location.spec) {
if (uri != location.spec) {
return;
}
let contentWindow = docShell.domWindow;