Bug 1407188 - Don't fail to send locationChange if the next URI has no host. r=walkingice

MozReview-Commit-ID: 6rRQ6K3wPwT

--HG--
extra : rebase_source : ecd7170057e3cfd5dc3fb68da09668c5adb44722
This commit is contained in:
Jan Henning 2017-10-26 15:49:38 +02:00
Родитель 72aaacd371
Коммит ac0a399a60
1 изменённых файлов: 9 добавлений и 3 удалений

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

@ -4495,10 +4495,16 @@ Tab.prototype = {
try {
originHost = Services.io.newURI(appOrigin).host;
} catch (e if (e.result == Cr.NS_ERROR_FAILURE)) {
// NS_ERROR_FAILURE can be thrown by nsIURI.host if the URI scheme does not possess a host - in this case
// we just act as if we have an empty host.
// NS_ERROR_FAILURE can be thrown by nsIURI.host if the URI scheme does not possess a host -
// in this case we just act as if we have an empty host.
}
if (originHost != aLocationURI.host) {
let locationHost = "";
try {
locationHost = aLocationURI.host;
} catch (e if (e.result == Cr.NS_ERROR_FAILURE)) {
// Ditto.
}
if (originHost != locationHost || originHost == "") {
// Note: going 'back' will not make this tab pinned again
ss.deleteTabValue(this, "appOrigin");
}