You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/12/19 19:48:06 UTC
[1/2] js commit: Revert "Fix failing exec tests introduced by
previous commit."
Updated Branches:
refs/heads/master 130db892e -> 2baecb558
Revert "Fix failing exec tests introduced by previous commit."
This reverts commit 130db892e069d2430647ff111140a9398c416735.
Accidentally included other changes.
Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/ed66d0ad
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/ed66d0ad
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/ed66d0ad
Branch: refs/heads/master
Commit: ed66d0ad1618d0f4e9f3e805394c1a2d9d8d1969
Parents: 130db89
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Dec 19 13:46:58 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Dec 19 13:46:58 2013 -0500
----------------------------------------------------------------------
src/ios/exec.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/ed66d0ad/src/ios/exec.js
----------------------------------------------------------------------
diff --git a/src/ios/exec.js b/src/ios/exec.js
index 4843332..07f7c7d 100644
--- a/src/ios/exec.js
+++ b/src/ios/exec.js
@@ -60,10 +60,10 @@ function createExecIframe() {
}
function shouldBundleCommandJson() {
- if (bridgeMode === jsToNativeModes.XHR_WITH_PAYLOAD) {
+ if (bridgeMode == jsToNativeModes.XHR_WITH_PAYLOAD) {
return true;
}
- if (bridgeMode === jsToNativeModes.XHR_OPTIONAL_PAYLOAD || bridgeMode === jsToNativeModes.HASH_OPTIONAL_PAYLOAD) {
+ if (bridgeMode == jsToNativeModes.XHR_OPTIONAL_PAYLOAD || jsToNativeModes.HASH_OPTIONAL_PAYLOAD) {
var payloadLength = 0;
for (var i = 0; i < commandQueue.length; ++i) {
payloadLength += commandQueue[i].length;
@@ -124,8 +124,11 @@ function convertMessageToArgsNativeToJs(message) {
}
function iOSExec() {
+ // XHR mode does not work on iOS 4.2, so default to IFRAME_NAV for such devices.
+ // XHR mode's main advantage is working around a bug in -webkit-scroll, which
+ // doesn't exist in 4.X devices anyways.
if (bridgeMode === undefined) {
- bridgeMode = jsToNativeModes.HASH_OPTIONAL_PAYLOAD;
+ bridgeMode = navigator.userAgent.indexOf(' 4_') == -1 ? jsToNativeModes.XHR_NO_PAYLOAD : jsToNativeModes.IFRAME_NAV;
}
var successCallback, failCallback, service, action, actionArgs, splitCommand;
[2/2] js commit: Fix broken tests take 2
Posted by ag...@apache.org.
Fix broken tests take 2
Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/2baecb55
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/2baecb55
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/2baecb55
Branch: refs/heads/master
Commit: 2baecb5581af56d54188675043a87fc7331afe0d
Parents: ed66d0a
Author: Andrew Grieve <ag...@chromium.org>
Authored: Thu Dec 19 13:47:50 2013 -0500
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Thu Dec 19 13:47:50 2013 -0500
----------------------------------------------------------------------
src/ios/exec.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-js/blob/2baecb55/src/ios/exec.js
----------------------------------------------------------------------
diff --git a/src/ios/exec.js b/src/ios/exec.js
index 07f7c7d..e403145 100644
--- a/src/ios/exec.js
+++ b/src/ios/exec.js
@@ -60,10 +60,10 @@ function createExecIframe() {
}
function shouldBundleCommandJson() {
- if (bridgeMode == jsToNativeModes.XHR_WITH_PAYLOAD) {
+ if (bridgeMode === jsToNativeModes.XHR_WITH_PAYLOAD) {
return true;
}
- if (bridgeMode == jsToNativeModes.XHR_OPTIONAL_PAYLOAD || jsToNativeModes.HASH_OPTIONAL_PAYLOAD) {
+ if (bridgeMode === jsToNativeModes.XHR_OPTIONAL_PAYLOAD || bridgeMode === jsToNativeModes.HASH_OPTIONAL_PAYLOAD) {
var payloadLength = 0;
for (var i = 0; i < commandQueue.length; ++i) {
payloadLength += commandQueue[i].length;