Bug 584340 - nsIXMLHttpRequest.statusText in Blocklist.prototype.onXMLError

r=robstrong a=beltzner
This commit is contained in:
timeless@mozdev.org 2011-02-16 14:14:16 +01:00
Родитель c73afe525f
Коммит 036a2f777e
1 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -559,10 +559,14 @@ Blocklist.prototype = {
request = aEvent.target.channel.QueryInterface(Ci.nsIRequest); request = aEvent.target.channel.QueryInterface(Ci.nsIRequest);
status = request.status; status = request.status;
} }
var statusText = request.statusText; var statusText = "nsIXMLHttpRequest channel unavailable";
// When status is 0 we don't have a valid channel. // When status is 0 we don't have a valid channel.
if (status == 0) if (status != 0) {
statusText = "nsIXMLHttpRequest channel unavailable"; try {
statusText = request.statusText;
} catch (e) {
}
}
LOG("Blocklist:onError: There was an error loading the blocklist file\r\n" + LOG("Blocklist:onError: There was an error loading the blocklist file\r\n" +
statusText); statusText);
}, },