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 d7680acaa9
commit 21601544ab

View File

@ -782,7 +782,15 @@ function gKeywordURIFixup({ target: browser, data: fixupInfo }) {
notification.persistence = 1;
};
try {
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.