mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 01:08:21 +00:00
Bug 345899 - Protect against XMLHttpRequest statusText not being available. r=sspitzer
This commit is contained in:
parent
d29ff463e6
commit
0429f4d0b1
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user