Bug 345899 - Protect against XMLHttpRequest statusText not being available. r=sspitzer

This commit is contained in:
rob_strong%exchangecode.com 2006-07-25 21:09:22 +00:00
parent d29ff463e6
commit 0429f4d0b1

View File

@ -6181,9 +6181,13 @@ RDFItemUpdater.prototype = {
request = aEvent.target.channel.QueryInterface(Components.interfaces.nsIRequest);
status = request.status;
}
// this can fail when a network connection is not present.
try {
var statusText = request.statusText;
}
catch (e) {
status = 0;
}
// When status is 0 we don't have a valid channel.
if (status == 0)
statusText = "nsIXMLHttpRequest channel unavailable";