[Pkg-mozext-commits] [greasemonkey] 13/19: Use Components.isSuccessCode(status) instead of status != 0.

David Prévot taffit at moszumanska.debian.org
Sat Mar 21 02:50:58 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository greasemonkey.

commit 99e8756e6d3f84bae26b49d16496de5e61fcf042
Author: Ventero <ventero at ventero.de>
Date:   Tue Sep 16 03:52:00 2014 +0200

    Use Components.isSuccessCode(status) instead of status != 0.
    
    As the documentation states, a non-zero XPCOM return code does not
    indicate failure as long as the high bit is 0.
---
 modules/remoteScript.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/remoteScript.js b/modules/remoteScript.js
index 0aa0c50..3e09939 100644
--- a/modules/remoteScript.js
+++ b/modules/remoteScript.js
@@ -178,7 +178,7 @@ DownloadListener.prototype = {
     this._binOutputStream.close();
     this._fileOutputStream.close();
 
-    var error = aStatusCode !== 0;
+    var error = !Components.isSuccessCode(aStatusCode);
     var errorMessage = stringBundle.GetStringFromName('error.unknown');
     try {
       var httpChannel = aRequest.QueryInterface(Ci.nsIHttpChannel);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git



More information about the Pkg-mozext-commits mailing list