You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ti...@apache.org on 2013/03/27 23:26:58 UTC

[3/4] webworks commit: [CB-2745] - updating javascript again

[CB-2745] - updating javascript again


Project: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/commit/4ab1a564
Tree: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/tree/4ab1a564
Diff: http://git-wip-us.apache.org/repos/asf/cordova-blackberry/diff/4ab1a564

Branch: refs/heads/master
Commit: 4ab1a56426ea3006152ed887640cad676cccc9f3
Parents: a6bd8cd
Author: Tim Kim <ti...@adobe.com>
Authored: Wed Mar 27 14:18:58 2013 -0700
Committer: Tim Kim <ti...@adobe.com>
Committed: Wed Mar 27 15:26:40 2013 -0700

----------------------------------------------------------------------
 javascript/cordova.blackberry.js |   47 ++++++++++++++++++--------------
 1 files changed, 26 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-blackberry/blob/4ab1a564/javascript/cordova.blackberry.js
----------------------------------------------------------------------
diff --git a/javascript/cordova.blackberry.js b/javascript/cordova.blackberry.js
index fbe61f5..6df67ea 100644
--- a/javascript/cordova.blackberry.js
+++ b/javascript/cordova.blackberry.js
@@ -1,8 +1,8 @@
 // Platform: blackberry
 
-// commit bbf1562d4934b1331ffb263424b6ae054cedeb71
+// commit 104709b2130a29e7ad8596d1a6cee1ed48138803
 
-// File generated at :: Fri Mar 22 2013 14:49:45 GMT-0700 (PDT)
+// File generated at :: Wed Mar 27 2013 13:50:52 GMT-0700 (PDT)
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one
@@ -5361,7 +5361,7 @@ module.exports = {
                     model: "PlayBook",
                     name: "PlayBook", // deprecated: please use device.model
                     uuid: info.uuid,
-                    cordova: "2.5.0"
+                    cordova: "2.6.0rc1"
                 });
             }),
             request = new blackberry.transport.RemoteFunctionCall("org/apache/cordova/getDeviceInfo");
@@ -9290,7 +9290,7 @@ module.exports = {
             model: "Dev Alpha",
             name: "Dev Alpha", // deprecated: please use device.model
             uuid: blackberry.identity.uuid,
-            cordova: "2.5.0"
+            cordova: "2.6.0rc1"
         });
 
         return { "status" : cordova.callbackStatus.NO_RESULT, "message" : "Device info returned" };
@@ -10824,27 +10824,32 @@ document.addEventListener("DOMContentLoaded", function () {
     }
 
     // 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));