incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deedu...@apache.org
Subject js commit: [CB-1090] Remove listener before invoking callback.
Date Wed, 18 Jul 2012 18:26:35 GMT
Updated Branches:
  refs/heads/master 3d0790c87 -> f186752d4


[CB-1090] Remove listener before invoking callback.


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

Branch: refs/heads/master
Commit: f186752d4aa01556879059f2ceb6da9de8b5e5a9
Parents: 3d0790c
Author: Drew Walters <deedubbu@gmail.com>
Authored: Wed Jul 18 13:25:35 2012 -0500
Committer: Drew Walters <deedubbu@gmail.com>
Committed: Wed Jul 18 13:25:35 2012 -0500

----------------------------------------------------------------------
 lib/common/plugin/accelerometer.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/f186752d/lib/common/plugin/accelerometer.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/accelerometer.js b/lib/common/plugin/accelerometer.js
index f343902..d009a56 100644
--- a/lib/common/plugin/accelerometer.js
+++ b/lib/common/plugin/accelerometer.js
@@ -73,12 +73,12 @@ var accelerometer = {
 
         var p;
         var win = function(a) {
-            successCallback(a);
             removeListeners(p);
+            successCallback(a);
         };
         var fail = function(e) {
-            errorCallback(e);
             removeListeners(p);
+            errorCallback(e);
         };
 
         p = createCallbackPair(win, fail);
@@ -110,8 +110,8 @@ var accelerometer = {
         var id = utils.createUUID();
 
         var p = createCallbackPair(function(){}, function(e) {
-            errorCallback(e);
             removeListeners(p);
+            errorCallback(e);
         });
         listeners.push(p);
 


Mime
View raw message