зеркало из https://github.com/mozilla/gecko-dev.git
195833 - js error in onLocationChange when trying to get hostPort if there isn't one. r=jag, sr=bzbarsky
This commit is contained in:
Родитель
6c77ea4436
Коммит
e6dc4caea8
|
@ -294,6 +294,7 @@ nsBrowserStatusHandler.prototype =
|
||||||
{
|
{
|
||||||
this.setOverLink("");
|
this.setOverLink("");
|
||||||
|
|
||||||
|
var locationURI = null;
|
||||||
var location = "";
|
var location = "";
|
||||||
|
|
||||||
if (aLocation) {
|
if (aLocation) {
|
||||||
|
@ -304,7 +305,9 @@ nsBrowserStatusHandler.prototype =
|
||||||
// If the url has "wyciwyg://" as the protocol, strip it off.
|
// If the url has "wyciwyg://" as the protocol, strip it off.
|
||||||
// Nobody wants to see it on the urlbar for dynamically generated
|
// Nobody wants to see it on the urlbar for dynamically generated
|
||||||
// pages.
|
// pages.
|
||||||
location = gURIFixup.createExposableURI(aLocation).spec;
|
locationURI = gURIFixup.createExposableURI(aLocation);
|
||||||
|
location = locationURI.spec;
|
||||||
|
|
||||||
}
|
}
|
||||||
catch(ex) {
|
catch(ex) {
|
||||||
location = aLocation.spec;
|
location = aLocation.spec;
|
||||||
|
@ -345,9 +348,18 @@ nsBrowserStatusHandler.prototype =
|
||||||
//clear popupDomain accordingly so that icon will go away when visiting
|
//clear popupDomain accordingly so that icon will go away when visiting
|
||||||
//an unblocked site after a blocked site. note: if a popup is blocked
|
//an unblocked site after a blocked site. note: if a popup is blocked
|
||||||
//the icon will stay as long as we are in the same domain.
|
//the icon will stay as long as we are in the same domain.
|
||||||
|
|
||||||
if (blank ||
|
if (blank ||
|
||||||
!("popupDomain" in browser) ||
|
!("popupDomain" in browser)) {
|
||||||
aLocation.hostPort != browser.popupDomain) {
|
browser.popupDomain = null;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var hostPort = "";
|
||||||
|
try {
|
||||||
|
hostPort = locationURI.hostPort;
|
||||||
|
}
|
||||||
|
catch(ex) { }
|
||||||
|
if (hostPort != browser.popupDomain)
|
||||||
browser.popupDomain = null;
|
browser.popupDomain = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче