cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: Updated cordova.js
Date Thu, 03 Dec 2015 19:55:11 GMT
Repository: cordova-ios
Updated Branches:
  refs/heads/master 26cca47e3 -> 1b9920ca9


Updated cordova.js


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

Branch: refs/heads/master
Commit: 1b9920ca9961aa57881f95f41543a79d7cb34c18
Parents: 26cca47
Author: Shazron Abdullah <shazron@apache.org>
Authored: Thu Dec 3 11:56:21 2015 -0800
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Thu Dec 3 11:56:21 2015 -0800

----------------------------------------------------------------------
 CordovaLib/cordova.js | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/1b9920ca/CordovaLib/cordova.js
----------------------------------------------------------------------
diff --git a/CordovaLib/cordova.js b/CordovaLib/cordova.js
index 0bda072..9945d86 100644
--- a/CordovaLib/cordova.js
+++ b/CordovaLib/cordova.js
@@ -817,7 +817,7 @@ module.exports = channel;
 
 });
 
-// file: /Repos/cordova/cordova-ios/cordova-js-src/exec.js
+// file: /Users/shaz/Documents/Git/Apache/cordova-ios/cordova-js-src/exec.js
 define("cordova/exec", function(require, exports, module) {
 
 /*global require, module, atob, document */
@@ -935,7 +935,32 @@ function iOSExec() {
     }
 }
 
+function handleBridgeChange() {
+    if (iOSExec !== cordova.exec) {
+        var commandString = commandQueue.shift();
+        while(commandString) {
+            var command = JSON.parse(commandString);
+            var callbackId = command[0];
+            var service = command[1];
+            var action = command[2];
+            var actionArgs = command[3];
+            var callbacks = cordova.callbacks[callbackId] || {};
+            
+            cordova.exec(callbacks.success, callbacks.fail, service, action, actionArgs);
+            
+            commandString = commandQueue.shift();
+        };
+        return true;
+    }
+    
+    return false;
+}     
+
 function pokeNative() {
+    if (handleBridgeChange()) {
+        return;
+    }
+    
     // CB-5488 - Don't attempt to create iframe before document.body is available.
     if (!document.body) {
         setTimeout(pokeNative);
@@ -1487,7 +1512,7 @@ exports.reset();
 
 });
 
-// file: /Repos/cordova/cordova-ios/cordova-js-src/platform.js
+// file: /Users/shaz/Documents/Git/Apache/cordova-ios/cordova-js-src/platform.js
 define("cordova/platform", function(require, exports, module) {
 
 module.exports = {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message