You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/03/27 18:38:54 UTC

js commit: [CB-2226] Remove callbacks from FileTransfer.abort() method

Updated Branches:
  refs/heads/master 32b9e1c30 -> 02968603f


[CB-2226] Remove callbacks from FileTransfer.abort() method


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/02968603
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/02968603
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/02968603

Branch: refs/heads/master
Commit: 02968603f31cf890d9822a0faf7357d007cb5caa
Parents: 32b9e1c
Author: Ian Clelland <ic...@chromium.org>
Authored: Mon Mar 18 16:17:02 2013 -0400
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Wed Mar 27 13:38:37 2013 -0400

----------------------------------------------------------------------
 lib/common/plugin/FileTransfer.js |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/02968603/lib/common/plugin/FileTransfer.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/FileTransfer.js b/lib/common/plugin/FileTransfer.js
index 20c0eb2..8c75db7 100644
--- a/lib/common/plugin/FileTransfer.js
+++ b/lib/common/plugin/FileTransfer.js
@@ -191,12 +191,11 @@ FileTransfer.prototype.download = function(source, target, successCallback, erro
 };
 
 /**
- * Aborts the ongoing file transfer on this object
- * @param successCallback {Function}  Callback to be invoked upon success
- * @param errorCallback {Function}    Callback to be invoked upon error
+ * Aborts the ongoing file transfer on this object. The original error
+ * callback for the file transfer will be called if necessary.
  */
-FileTransfer.prototype.abort = function(successCallback, errorCallback) {
-    exec(successCallback, errorCallback, 'FileTransfer', 'abort', [this._id]);
+FileTransfer.prototype.abort = function() {
+    exec(null, null, 'FileTransfer', 'abort', [this._id]);
 };
 
 module.exports = FileTransfer;