You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2016/10/12 22:20:47 UTC
android commit: CB-11880 android: Fail-safe for cordova.exec()
Repository: cordova-android
Updated Branches:
refs/heads/master b2d712442 -> f838db4e1
CB-11880 android: Fail-safe for cordova.exec()
- added preliminary sanity check on args variable
- replication of iosExec() behaviour
- allows to call cordova.exec() without args variable
This closes #334
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/f838db4e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/f838db4e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/f838db4e
Branch: refs/heads/master
Commit: f838db4e181d658fda69e4f962436ab5fbf8d9c4
Parents: b2d7124
Author: Thomas Raffray <ra...@gmail.com>
Authored: Wed Sep 21 11:06:01 2016 +0200
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Oct 12 15:20:40 2016 -0700
----------------------------------------------------------------------
cordova-js-src/exec.js | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/f838db4e/cordova-js-src/exec.js
----------------------------------------------------------------------
diff --git a/cordova-js-src/exec.js b/cordova-js-src/exec.js
index b45aee8..f73d87a 100644
--- a/cordova-js-src/exec.js
+++ b/cordova-js-src/exec.js
@@ -78,6 +78,9 @@ function androidExec(success, fail, service, action, args) {
androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT);
}
+ // If args is not provided, default to an empty array
+ args = args || [];
+
// Process any ArrayBuffers in the args into a string.
for (var i = 0; i < args.length; i++) {
if (utils.typeName(args[i]) == 'ArrayBuffer') {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org