cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (CB-11880) cordova/exec crashes on Android when no [<args>] supplied
Date Wed, 12 Oct 2016 22:21:20 GMT


ASF subversion and git services commented on CB-11880:

Commit f838db4e181d658fda69e4f962436ab5fbf8d9c4 in cordova-android's branch refs/heads/master
from [~Fluf]
[;h=f838db4 ]

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

> cordova/exec crashes on Android when no [<args>] supplied
> ---------------------------------------------------------
>                 Key: CB-11880
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android
>            Reporter: Thomas Raffray
>            Priority: Minor
> When calling the function {code}cordova.exec(<successFunction>, <failFunction>,
<service>, <action>, [<args>]){code} without the last argument, a TypeError
is returned.
> The issue happens after cordova-android/cordova-js-src/exec.js tries to call the length()
function on args. As a result, the Cordova platform does not invoke the native plugin code.
> Although the exec() prototype clearly requires the \[<args>\] parameter, the iOS
version of exec() makes a preliminary sanity check on this variable to avoid generating an
> Suggest to replicate this behaviour on the Android platform to provide the same fail-safe

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message