cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject cordova-windows git commit: CB-8417 update platform specific js from cordovajs
Date Tue, 19 May 2015 01:53:40 GMT
Repository: cordova-windows
Updated Branches:
  refs/heads/master ca820841f -> b8bcdad43


CB-8417 update platform specific js from cordovajs


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

Branch: refs/heads/master
Commit: b8bcdad43799f9c14c411ae94578939bbd837e9e
Parents: ca82084
Author: Steve Gill <stevengill97@gmail.com>
Authored: Mon May 18 18:53:34 2015 -0700
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Mon May 18 18:53:34 2015 -0700

----------------------------------------------------------------------
 cordova-js-src/exec.js     | 12 ++++++++++--
 cordova-js-src/platform.js |  5 ++++-
 2 files changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/b8bcdad4/cordova-js-src/exec.js
----------------------------------------------------------------------
diff --git a/cordova-js-src/exec.js b/cordova-js-src/exec.js
index 88d34c0..18f559a 100644
--- a/cordova-js-src/exec.js
+++ b/cordova-js-src/exec.js
@@ -61,7 +61,11 @@ module.exports = function (success, fail, service, action, args) {
             onSuccess = function (result, callbackOptions) {
                 callbackOptions = callbackOptions || {};
                 var callbackStatus;
-                if (callbackOptions.status != null) {
+                // covering both undefined and null.
+                // strict null comparison was causing callbackStatus to be undefined
+                // and then no callback was called because of the check in cordova.callbackFromNative
+                // see CB-8996 Mobilespec app hang on windows
+                if (callbackOptions.status !== undefined && callbackOptions.status
!== null) {
                     callbackStatus = callbackOptions.status;
                 }
                 else {
@@ -77,7 +81,11 @@ module.exports = function (success, fail, service, action, args) {
             onError = function (err, callbackOptions) {
                 callbackOptions = callbackOptions || {};
                 var callbackStatus;
-                if (callbackOptions.status != null) {
+                // covering both undefined and null.
+                // strict null comparison was causing callbackStatus to be undefined
+                // and then no callback was called because of the check in cordova.callbackFromNative
+                // see CB-8996 Mobilespec app hang on windows
+                if (callbackOptions.status !== undefined && callbackOptions.status
!== null) {
                     callbackStatus = callbackOptions.status;
                 }
                 else {

http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/b8bcdad4/cordova-js-src/platform.js
----------------------------------------------------------------------
diff --git a/cordova-js-src/platform.js b/cordova-js-src/platform.js
index 2807505..defb8fa 100644
--- a/cordova-js-src/platform.js
+++ b/cordova-js-src/platform.js
@@ -50,7 +50,10 @@ module.exports = {
         if (!window.WinJS) {
             var scriptElem = document.createElement("script");
 
-            if (navigator.appVersion.indexOf("Windows Phone 8.1;") !== -1) {
+            if (navigator.appVersion.indexOf('MSAppHost/3.0') !== -1) {
+                // Windows 10 UWP
+                scriptElem.src = '/WinJS/js/WinJS.js';
+            } else if (navigator.appVersion.indexOf("Windows Phone 8.1;") !== -1) {
                 // windows phone 8.1 + Mobile IE 11
                 scriptElem.src = "//Microsoft.Phone.WinJS.2.1/js/base.js";
             } else if (navigator.appVersion.indexOf("MSAppHost/2.0;") !== -1) {


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


Mime
View raw message