Bug 1409618 Make search tests get the channel URI before the channel is destroyed. r=florian

This commit is contained in:
Ben Kelly 2017-10-25 08:23:42 -07:00
Родитель 243e3d19f0
Коммит 9dad954e1b
2 изменённых файлов: 6 добавлений и 4 удалений

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

@ -32,7 +32,8 @@ function promiseStateChangeURI() {
if (!(flags & docStart) || !webProgress.isTopLevel)
return;
if (req.originalURI.spec == "about:blank")
let spec = req.originalURI.spec;
if (spec == "about:blank")
return;
gBrowser.removeProgressListener(listener);
@ -44,7 +45,7 @@ function promiseStateChangeURI() {
req.cancel(Components.results.NS_ERROR_FAILURE);
executeSoon(() => {
resolve(req.originalURI.spec);
resolve(spec);
});
}
};

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

@ -82,7 +82,8 @@ function promiseStateChangeURI() {
if (!(flags & docStart) || !webProgress.isTopLevel)
return;
if (req.originalURI.spec == "about:blank")
let spec = req.originalURI.spec;
if (spec == "about:blank")
return;
gBrowser.removeProgressListener(listener);
@ -94,7 +95,7 @@ function promiseStateChangeURI() {
req.cancel(Components.results.NS_ERROR_FAILURE);
executeSoon(() => {
resolve(req.originalURI.spec);
resolve(spec);
});
}
};