fix Bug 245588, certain malformed URL or missing local pages break startup

This commit is contained in:
mconnor%myrealbox.com 2005-01-20 23:04:06 +00:00
parent ea41dbc112
commit b5a05344dd

View File

@ -1230,8 +1230,15 @@ function loadOneOrMoreURIs(aURIString)
{
var urls = aURIString.split("|");
loadURI(urls[0]);
for (var i = 1; i < urls.length; ++i)
gBrowser.addTab(urls[i]);
for (var i = 1; i < urls.length; ++i) {
// addTab throws for certain malformed URIs
// catch this so we don't hork startup.
try {
gBrowser.addTab(urls[i]);
} catch (ex) {
// do nothing
}
}
}
function constructGoMenuItem(goMenu, beforeItem, url, title)