Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5CFFE200B64 for ; Tue, 2 Aug 2016 08:28:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 45EAB160AA8; Tue, 2 Aug 2016 06:28:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8F3F2160A76 for ; Tue, 2 Aug 2016 08:28:21 +0200 (CEST) Received: (qmail 49481 invoked by uid 500); 2 Aug 2016 06:28:20 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 49452 invoked by uid 99); 2 Aug 2016 06:28:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Aug 2016 06:28:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 945EB2C0D5E for ; Tue, 2 Aug 2016 06:28:20 +0000 (UTC) Date: Tue, 2 Aug 2016 06:28:20 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-11535) Logic error in uninstall frameworks in iOS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 02 Aug 2016 06:28:22 -0000 [ https://issues.apache.org/jira/browse/CB-11535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15403453#comment-15403453 ] ASF subversion and git services commented on CB-11535: ------------------------------------------------------ Commit 26a997dbfc3185e12248eecb8889d599b47d9a99 in cordova-ios's branch refs/heads/master from [~Nikita Matrosov] [ https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git;h=26a997d ] CB-11535 CB-10361 ios: fix bug with remove frameworks This closes #238 > 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