Bug 1079707 - asyncresolve can throw, r=alexbardas

--HG--
extra : rebase_source : e1a83fed31780d9e1d56dc795e157e17525ff9f6
This commit is contained in:
Gijs Kruitbosch 2014-10-16 15:01:32 -07:00
parent 463b49d081
commit f947d75c0d

View File

@ -782,7 +782,15 @@ function gKeywordURIFixup({ target: browser, data: fixupInfo }) {
notification.persistence = 1; notification.persistence = 1;
}; };
try {
gDNSService.asyncResolve(hostName, 0, onLookupComplete, Services.tm.mainThread); gDNSService.asyncResolve(hostName, 0, onLookupComplete, Services.tm.mainThread);
} catch (ex) {
// Do nothing if the URL is invalid (we don't want to show a notification in that case).
if (ex.result != Cr.NS_ERROR_UNKNOWN_HOST) {
// ... otherwise, report:
Cu.reportError(ex);
}
}
} }
// Called when a docshell has attempted to load a page in an incorrect process. // Called when a docshell has attempted to load a page in an incorrect process.