incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject ios commit: Update cordova.ios.js.
Date Tue, 21 Aug 2012 01:33:35 GMT
Updated Branches:
  refs/heads/master aa8865981 -> 242837e48


Update cordova.ios.js.


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

Branch: refs/heads/master
Commit: 242837e48c36edd654f7b9f78de261630cbe82e0
Parents: aa88659
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Mon Aug 20 21:32:34 2012 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Mon Aug 20 21:32:34 2012 -0400

----------------------------------------------------------------------
 CordovaLib/javascript/cordova.ios.js |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/242837e4/CordovaLib/javascript/cordova.ios.js
----------------------------------------------------------------------
diff --git a/CordovaLib/javascript/cordova.ios.js b/CordovaLib/javascript/cordova.ios.js
index 9cd7f70..a40e860 100644
--- a/CordovaLib/javascript/cordova.ios.js
+++ b/CordovaLib/javascript/cordova.ios.js
@@ -1,6 +1,6 @@
-// commit 3cd1e8438d90f1fb72ae6eac45d0dac3b0f6c6f6
+// commit 7b33b31a909a156f7d59db40c6a04fce1a476c46
 
-// File generated at :: Fri Aug 17 2012 12:30:31 GMT-0700 (PDT)
+// File generated at :: Mon Aug 20 2012 21:31:08 GMT-0400 (EDT)
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one
@@ -29,6 +29,10 @@ var require,
 
 (function () {
     var modules = {};
+    // Stack of moduleIds currently being built.
+    var requireStack = [];
+    // Map of module ID -> index into requireStack of modules currently being built.
+    var inProgressModules = {};
 
     function build(module) {
         var factory = module.factory;
@@ -41,8 +45,21 @@ var require,
     require = function (id) {
         if (!modules[id]) {
             throw "module " + id + " not found";
+        } else if (id in inProgressModules) {
+            var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->'
+ id;
+            throw "Cycle in require graph: " + cycle;
         }
-        return modules[id].factory ? build(modules[id]) : modules[id].exports;
+        if (modules[id].factory) {
+            try {
+                inProgressModules[id] = requireStack.length;
+                requireStack.push(id);
+                return build(modules[id]);
+            } finally {
+                delete inProgressModules[id];
+                requireStack.pop();
+            }
+        }
+        return modules[id].exports;
     };
 
     define = function (id, factory) {
@@ -67,6 +84,7 @@ if (typeof module === "object" && typeof require === "function")
{
     module.exports.require = require;
     module.exports.define = define;
 }
+
 // file: lib/cordova.js
 define("cordova", function(require, exports, module) {
 var channel = require('cordova/channel');
@@ -989,10 +1007,6 @@ iOSExec.setJsToNativeBridgeMode = function(mode) {
         execIframe.parentNode.removeChild(execIframe);
         execIframe = null;
     }
-    if (mode && !cordova.iOSVCAddr) {
-        alert('ViewController not correctly initialized for XHR mode.');
-        mode = 0;
-    }
     bridgeMode = mode;
 };
 


Mime
View raw message