[ 
https://issues.apache.org/jira/browse/CB-10977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15214884#comment-15214884
 ] 

ASF GitHub Bot commented on CB-10977:
-------------------------------------

GitHub user riknoll opened a pull request:

    https://github.com/apache/cordova-plugin-file/pull/174

    CB-10977 android: Removing global state used for permission requests

    The associated JIRA is 
[CB-10977](https://issues.apache.org/jira/browse/CB-10977). Check out the 
description on the issue for an explanation of the problem. I also added some 
JS that reproduces it in the comments. This fix is contingent on 
https://github.com/apache/cordova-android/pull/285 to work properly (I plan to 
merge that PR soon).
    
    This will also change the behavior when used with older versions of 
cordova-android (i.e. without 
https://github.com/apache/cordova-android/pull/285) and should prevent some of 
the weirder bugs. The behavior will still be broken, but less so.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-plugin-file CB-10977

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-file/pull/174.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #174
    
----
commit 91fe4a3111447af4878554b4a824abc52978e26a
Author: Richard Knoll <[email protected]>
Date:   2016-03-28T19:09:21Z

    CB-10977 android: Removing global state used for permission requests

----


> Overlapping permission requests in Android can cause errors
> -----------------------------------------------------------
>
>                 Key: CB-10977
>                 URL: https://issues.apache.org/jira/browse/CB-10977
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin File
>         Environment: Marshmallow
>            Reporter: Richard B Knoll
>            Assignee: Richard B Knoll
>            Priority: Critical
>              Labels: android, reproduced, triaged
>
> We use global state for permission requests in the file plugin that gets 
> overwritten on each call to the plugin. That means that if multiple 
> writes/reads are performed while the permission request is pending, the 
> global state will get overwritten and callbacks will not be returned correctly



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to