couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Randall Leeds (Commented) (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-1362) couchjs doesn't clean out global namespace between views calls
Date Mon, 12 Dec 2011 22:15:30 GMT


Randall Leeds commented on COUCHDB-1362:

Would sealing/freezing the global object be sufficient? Users could probably still hang stuff
off attributes of the global object, such as passing information between views by adding it
as a property of the log() function, but at that point users should _know_ they're being tricky
and they might get punched.

With SM1.8.5 we could deep freeze the object, though I'd have to double check that it wouldn't
break any functionality.
> couchjs doesn't clean out global namespace between views calls
> --------------------------------------------------------------
>                 Key: COUCHDB-1362
>                 URL:
>             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:!default.jspa
For more information on JIRA, see:


View raw message