-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/12013/#review22229
-----------------------------------------------------------



framework/src/org/apache/cordova/api/PluginManager.java
<https://reviews.apache.org/r/12013/#comment45678>

    These params don't need to be final.



framework/src/org/apache/cordova/api/PluginManager.java
<https://reviews.apache.org/r/12013/#comment45679>

    Definitely need some comments here to explain why this is necessary.



framework/src/org/apache/cordova/api/PluginManager.java
<https://reviews.apache.org/r/12013/#comment45680>

    I realized tonight that a boolean here isn't enough. 
    Consider this case:
    
    1. set runExecOnUiThread = true
    2. runExecOnUiThread=false Runnable queued.
    3. Exec call "foo" gets made, Runnable queued.
    4. runExecOnUiThread=false runs
    5. Exec call "bar" gets made, executes right away
    6. Exec call "foo" Runnable is run
    
    We don't want to ever execute calls out-of-order. "bar" shouldn't get run 
before "foo".
    
    I think to fix this, we can use an AtomicInteger. Increment it every time 
an exec is queued, decrement it each time an exec finishes. Turn off 
runExecOnUiThread only once the count reaches 0.
    
    make sense?
    
    


- Andrew Grieve


On June 20, 2013, 8:16 p.m., Jeffrey Willms wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/12013/
> -----------------------------------------------------------
> 
> (Updated June 20, 2013, 8:16 p.m.)
> 
> 
> Review request for cordova and Andrew Grieve.
> 
> 
> Description
> -------
> 
> Fixing exec bug.
> 
> 
> This addresses bug CB-3927.
>     https://issues.apache.org/jira/browse/CB-3927
> 
> 
> Diffs
> -----
> 
>   framework/src/org/apache/cordova/api/PluginEntry.java 
> 9b9af6bc303965e7263bca75037256da81868fb2 
>   framework/src/org/apache/cordova/api/PluginManager.java 
> 71fc25817b5d58bb2fbf5a29158ef2c7d424d4ab 
> 
> Diff: https://reviews.apache.org/r/12013/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jeffrey Willms
> 
>

Reply via email to