cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject mac commit: Updated 2.6.0rc1 cordova.js
Date Thu, 28 Mar 2013 18:47:01 GMT
Updated Branches:
  refs/heads/2.6.x 28454d03e -> 04601fab8


Updated 2.6.0rc1 cordova.js


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

Branch: refs/heads/2.6.x
Commit: 04601fab8a58b7a3e9cc6a49e04f16c2db4ad9eb
Parents: 28454d0
Author: Shazron Abdullah <shazron@apache.org>
Authored: Thu Mar 28 11:46:41 2013 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Thu Mar 28 11:46:59 2013 -0700

----------------------------------------------------------------------
 CordovaFramework/cordova.osx.js |   43 +++++++++++++++++++---------------
 1 files changed, 24 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/04601fab/CordovaFramework/cordova.osx.js
----------------------------------------------------------------------
diff --git a/CordovaFramework/cordova.osx.js b/CordovaFramework/cordova.osx.js
index eeb494b..6185d96 100644
--- a/CordovaFramework/cordova.osx.js
+++ b/CordovaFramework/cordova.osx.js
@@ -1,8 +1,8 @@
 // Platform: osx
 
-// commit 47593b2bc1dba9bf46545b1da24577f937966e12
+// commit 104709b2130a29e7ad8596d1a6cee1ed48138803
 
-// File generated at :: Fri Mar 22 2013 11:26:03 GMT-0700 (PDT)
+// File generated at :: Thu Mar 28 2013 11:38:10 GMT-0700 (PDT)
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one
@@ -6034,27 +6034,32 @@ window.cordova = require('cordova');
     }
 
     // Try to XHR the cordova_plugins.json file asynchronously.
-    var xhr = new context.XMLHttpRequest();
-    xhr.onreadystatechange = function() {
-        if (this.readyState != 4) { // not DONE
-            return;
-        }
+    try { // we commented we were going to try, so let us actually try and catch 
+        var xhr = new context.XMLHttpRequest();
+        xhr.onreadystatechange = function() {
+            if (this.readyState != 4) { // not DONE
+                return;
+            }
 
-        // If the response is a JSON string which composes an array, call handlePluginsObject.
-        // If the request fails, or the response is not a JSON array, just call finishPluginLoading.
-        if (this.status == 200) {
-            var obj = JSON.parse(this.responseText);
-            if (obj && obj instanceof Array && obj.length > 0) {
-                handlePluginsObject(obj);
+            // If the response is a JSON string which composes an array, call handlePluginsObject.
+            // If the request fails, or the response is not a JSON array, just call finishPluginLoading.
+            if (this.status == 200) {
+                var obj = JSON.parse(this.responseText);
+                if (obj && obj instanceof Array && obj.length > 0) {
+                    handlePluginsObject(obj);
+                } else {
+                    finishPluginLoading();
+                }
             } else {
                 finishPluginLoading();
             }
-        } else {
-            finishPluginLoading();
-        }
-    };
-    xhr.open('GET', 'cordova_plugins.json', true); // Async
-    xhr.send();
+        };
+        xhr.open('GET', 'cordova_plugins.json', true); // Async
+        xhr.send();
+    }
+    catch(err) {
+        finishPluginLoading();
+    }
 }(window));
 
 


Mime
View raw message