You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by an...@apache.org on 2012/08/24 23:57:39 UTC

[50/50] [abbrv] js commit: [android] Fix circular dependency bug with exec() in callback.js.

[android] Fix circular dependency bug with exec() in callback.js.

Fixed by moving require() into function scope.


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/8def13da
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/8def13da
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/8def13da

Branch: refs/heads/master
Commit: 8def13da52d0c1974795c6390c99e356bb13c819
Parents: 40ece6b
Author: Andrew Grieve <ag...@chromium.org>
Authored: Mon Aug 20 11:02:10 2012 -0400
Committer: Anis Kadri <an...@gmail.com>
Committed: Fri Aug 24 13:49:58 2012 -0700

----------------------------------------------------------------------
 lib/android/plugin/android/callback.js |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/8def13da/lib/android/plugin/android/callback.js
----------------------------------------------------------------------
diff --git a/lib/android/plugin/android/callback.js b/lib/android/plugin/android/callback.js
index 4729678..d17c5ab 100644
--- a/lib/android/plugin/android/callback.js
+++ b/lib/android/plugin/android/callback.js
@@ -1,10 +1,11 @@
 var port = null,
     token = null,
-    exec = require('cordova/exec'),
     xmlhttp;
 
 module.exports = {
     start: function callback() {
+        // cordova/exec depends on this module, so we can't require cordova/exec on the module level.
+        var exec = require('cordova/exec'),
         xmlhttp = new XMLHttpRequest();
 
         // Callback function when XMLHttpRequest is ready