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

git-svn-id: svn://10.0.0.236/trunk@203675 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rob_strong%exchangecode.com
2006-07-25 21:09:22 +00:00
parent b90beefcfc
commit 3078e0f477

View File

@@ -6181,9 +6181,13 @@ RDFItemUpdater.prototype = {
request = aEvent.target.channel.QueryInterface(Components.interfaces.nsIRequest);
status = request.status;
}
var statusText = request.statusText;
// 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";