couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Smith <>
Subject Re: Branch to switch from SpiderMonkey to Node.js
Date Thu, 31 Jan 2013 16:17:12 GMT
On Thu, Jan 31, 2013 at 3:47 PM, Robert Newson <> wrote:

> Jason,
> I don't mean to be deliberately dense, but how could we, even in
> principle, write a test that asserts that a map function can't open a
> socket when there's no method to do so?

It's a good point. But, for example, we never even *look* at the global
namespace from the JS environment. We know the entire set of allowed
functions to be called. So, confirm that exactly those and none other is

Obviously tests like this were not so helpful with the one couchjs
implementation. I'm not complaining that the test is missing. I am saying I
will start to write tests like that.

But you are right. Mostly we will have to build confidence in a view server
the same way as the existing couchs, by code inspection.

Also, part of the sandbox is unrelated to the runtime. There should be no
way to store state between (e.g.) map() calls. I am not sure the current
view server is 100% correct in this regard. Hopefully I can move some of
these unit tests upstream and we can fix some bugs.

Iris Couch

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message