cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-11535) Logic error in uninstall frameworks in iOS
Date Fri, 22 Jul 2016 08:29:21 GMT

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

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

Github user codecov-io commented on the issue:

    https://github.com/apache/cordova-ios/pull/238
  
    ## [Current coverage][cc-pull] is 52.60% (diff: 100%)
    > Merging [#238][cc-pull] into [master][cc-base-branch] will increase coverage by **0.79%**
    
    ```diff
    @@             master       #238   diff @@
    ==========================================
      Files            11         11          
      Lines           882        882          
      Methods         132        132          
      Messages          0          0          
      Branches        143        143          
    ==========================================
    + Hits            457        464     +7   
    + Misses          425        418     -7   
      Partials          0          0          
    ```
    
    > Powered by [Codecov](https://codecov.io?src=pr). Last update [5c3885b...0095f78][cc-compare]
    [cc-base-branch]: https://codecov.io/gh/apache/cordova-ios/branch/master?src=pr
    [cc-compare]: https://codecov.io/gh/apache/cordova-ios/compare/5c3885b807f4c9556bf350c72400827a333f78d3...0095f782da338a76296168fd85a6d8b4c87984c5?src=pr
    [cc-pull]: https://codecov.io/gh/apache/cordova-ios/pull/238?src=pr


> Logic error in uninstall frameworks in iOS
> ------------------------------------------
>
>                 Key: CB-11535
>                 URL: https://issues.apache.org/jira/browse/CB-11535
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>            Reporter: Shazron Abdullah
>
> This is reference counting code.
> Line: https://github.com/apache/cordova-ios/blob/5c3885b807f4c9556bf350c72400827a333f78d3/bin/templates/scripts/cordova/lib/plugman/pluginHandlers.js#L100
> {code}
> project.frameworks[src] -= (project.frameworks[src] || 1) - 1;
> {code}
> which expands to:
> {code}
> project.frameworks[src] = project.frameworks[src] - (project.frameworks[src] || 1) -
1;
> {code}
> project.frameworks[src] would contain a number, or undefined.
> My guess is that the intent of this line is to decrement the reference count by 1. If
the count was not set, the resulting count value should be negative, according to the next
conditional "if (project.frameworks[src] < 1) {" where it would delete the entry in the
object.
> The correct line should be:
> {code}
> project.frameworks[src] = (project.frameworks[src] || 1) - 1;
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message