mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Bug 1079707 - asyncresolve can throw, r=alexbardas
--HG-- extra : rebase_source : e1a83fed31780d9e1d56dc795e157e17525ff9f6
This commit is contained in:
parent
463b49d081
commit
f947d75c0d
@ -782,7 +782,15 @@ function gKeywordURIFixup({ target: browser, data: fixupInfo }) {
|
||||
notification.persistence = 1;
|
||||
};
|
||||
|
||||
gDNSService.asyncResolve(hostName, 0, onLookupComplete, Services.tm.mainThread);
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user