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: Created July 29, 2013, 1:45 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,20 +213,20 @@ Downloader.prototype =
let errorCallback = function errorCallback(error)
{
let channelStatus = -1;
try
{
channelStatus = request.channel.status;
} catch (e) {}
- let responseStatus = "";
+ let responseStatus = -1;
try
{
- responseStatus = request.channel.QueryInterface(Ci.nsIHttpChannel).responseStatus;
+ responseStatus = request.status;
Thomas Greiner 2013/07/31 12:34:45 You don't need a try/catch here anymore. You can s
Wladimir Palant 2013/07/31 13:31:26 I verified that the Mozilla implementation indeed
} catch (e) {}
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