cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <agri...@google.com>
Subject Re: js commit: Need to coerce messags into a string on Android 2.2
Date Thu, 25 Oct 2012 14:28:30 GMT
Nice catch Simon! There's already similar fix in the exec() function, but I
dropped the ball on applying it to the retrieveJsMessages function.

I'm going put in another change to move this logic into the nativeApi
object so that the call sites don't need to worry about it.

Won't need a re-tag though, as it shouldn't change the logic at all.


On Wed, Oct 24, 2012 at 4:25 PM, <macdonst@apache.org> wrote:

> Updated Branches:
>   refs/heads/master 884cb0e8f -> 6881d72b9
>
>
> Need to coerce messags into a string on Android 2.2
>
>
> Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
> Commit:
> http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/6881d72b
> Tree:
> http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/6881d72b
> Diff:
> http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/6881d72b
>
> Branch: refs/heads/master
> Commit: 6881d72b96f476a1e8cd6e03fe1465a0fb88b000
> Parents: 884cb0e
> Author: Simon MacDonald <simon.macdonald@gmail.com>
> Authored: Wed Oct 24 15:53:20 2012 -0400
> Committer: Simon MacDonald <simon.macdonald@gmail.com>
> Committed: Wed Oct 24 15:53:20 2012 -0400
>
> ----------------------------------------------------------------------
>  lib/android/exec.js |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/6881d72b/lib/android/exec.js
> ----------------------------------------------------------------------
> diff --git a/lib/android/exec.js b/lib/android/exec.js
> index dcc1617..bc9083a 100644
> --- a/lib/android/exec.js
> +++ b/lib/android/exec.js
> @@ -199,6 +199,8 @@ androidExec.processMessages = function(messages) {
>                  window.setTimeout(pollOnce, 0);
>                  break;
>              }
> +            // Needed for Android 2.2
> +            messages = "" + messages;
>              var spaceIdx = messages.indexOf(' ');
>              var msgLen = +messages.slice(0, spaceIdx);
>              var message = messages.substr(spaceIdx + 1, msgLen);
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message