From dev-return-19694-apmail-couchdb-dev-archive=couchdb.apache.org@couchdb.apache.org Tue Dec 13 02:16:04 2011 Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E45309454 for ; Tue, 13 Dec 2011 02:16:03 +0000 (UTC) Received: (qmail 56315 invoked by uid 500); 13 Dec 2011 02:16:03 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 56274 invoked by uid 500); 13 Dec 2011 02:16:03 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 56266 invoked by uid 99); 13 Dec 2011 02:16:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 02:16:03 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 02:15:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id BD13D10FE76 for ; Tue, 13 Dec 2011 02:15:31 +0000 (UTC) Date: Tue, 13 Dec 2011 02:15:31 +0000 (UTC) From: "Paul Joseph Davis (Commented) (JIRA)" To: dev@couchdb.apache.org Message-ID: <647047169.4028.1323742531800.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <47239193.63113.1323643240115.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (COUCHDB-1362) couchjs doesn't clean out global namespace between views calls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168065#comment-13168065 ] Paul Joseph Davis commented on COUCHDB-1362: -------------------------------------------- Except sealing has issues in some versions. And I'm not sure if that even gets us out of crazy town. We already use sub-contexts that are sealed if possible and I'm not entirely certain on the interplay there. I've also heard from other SpiderMonkey embeders that do things like "scan k/v pairs on global, run js, delete unknown keys and reset values" which sounds like a best effort but not full proof way of dealing with this. Basically, there's a lot to this and "don't do that" has served us well enough for long enough that unless someone wants to take on the task of making these things work for our supported versions of SpiderMonkey I'd be a bit hesitant on allocating cycles to it right now. > couchjs doesn't clean out global namespace between views calls > -------------------------------------------------------------- > > Key: COUCHDB-1362 > URL: https://issues.apache.org/jira/browse/COUCHDB-1362 > Project: CouchDB > Issue Type: Bug > Affects Versions: 1.1.1 > Environment: Linux > Reporter: jay groven > Priority: Minor > > Sometimes a view can access the functions that were defined in a previous view. This can lead a developer to think that function sharing has been implemented, but it's not reliable behaviour. It would be better if the global namespace were cleared between map/reduce runs so that it's clear that there is no reliable way to share functions between views. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira