Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B4130D583 for ; Fri, 7 Sep 2012 14:10:07 +0000 (UTC) Received: (qmail 44971 invoked by uid 500); 7 Sep 2012 14:10:07 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 44934 invoked by uid 500); 7 Sep 2012 14:10:07 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 44925 invoked by uid 99); 7 Sep 2012 14:10:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Sep 2012 14:10:07 +0000 Date: Sat, 8 Sep 2012 01:10:07 +1100 (NCT) From: "Braden Shepherdson (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1923378216.50285.1347027007441.JavaMail.jiratomcat@arcas> Subject: [jira] [Created] (CB-1388) Add reset() to plugin API and fix callback collisions on all platforms MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Braden Shepherdson created CB-1388: -------------------------------------- Summary: Add reset() to plugin API and fix callback collisions on all platforms Key: CB-1388 URL: https://issues.apache.org/jira/browse/CB-1388 Project: Apache Cordova Issue Type: Bug Components: Android, Bada, BlackBerry, CordovaJS, iOS, Qt, Tizen, webOS, Windows 8, WP7 Affects Versions: 2.0.0 Reporter: Braden Shepherdson Assignee: Braden Shepherdson Fix For: 2.2.0 There are three parts to this bug. First, platform-specific: we should add a reset() function to the plugin API which is called on top-level navigation or refresh, so that plugins can know to cancel any long-running requests and reinitialize themselves. This won't be relevant to some platforms Second, platform-independent: the callback IDs generated on the Javascript side should be randomized in some way to prevent collisions after navigation. Otherwise a request might get the ID "Service1", and before it has a chance to complete we navigate and a new request is made, also receiving "Service1". Then the first response comes back and the new Service1 callback is handed the old results. Third, we should add a test for this to Mobile Spec, if possible. This is a tricky thing to reproduce reliably, unfortunately. I'll tackle the second and third parts, and Android for the first part. It would be great if people who work on other platforms would add the reset() logic, or close the platform bugs if the platform is all-Javascript and fully reloaded on navigation. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira