Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/downloader.js

Issue 11292041: Use XMLHttpRequest.status instead of nsIHttpChannel.responseStatus(same value, better cross-browse… (Closed)
Patch Set: Removed exception handling Created July 31, 2013, 1:29 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/downloader.js
===================================================================
--- a/lib/downloader.js
+++ b/lib/downloader.js
@@ -213,21 +213,17 @@ Downloader.prototype =
let errorCallback = function errorCallback(error)
{
let channelStatus = -1;
try
{
channelStatus = request.channel.status;
} catch (e) {}
- let responseStatus = -1;
- try
- {
- responseStatus = request.status;
- } catch (e) {}
+ let responseStatus = request.status;
Cu.reportError("Adblock Plus: Downloading URL " + downloadable.url + " failed (" + error + ")\n" +
"Download address: " + downloadURL + "\n" +
"Channel status: " + channelStatus + "\n" +
"Server response: " + responseStatus);
if (this.onDownloadError)
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld