Commit Graph

4 Commits (4b19bd28967101b7afed3819cf595d4f04a1b11e)

Author SHA1 Message Date
Ryan Dahl 9fd5e3c89c Update tests to work with module contexts 2010-07-15 14:21:31 -07:00
isaacs 31ed37fdf0 evalcx shouldn't be too fancy
After getting some feedback from Mikeal Rogers and Tim Smart, it was decided
that evalcx should not try to do any fancy security stuff, and instead leave
that in the hands of the user. To comply more with spidermonkey, everything
is passed in, and objects are passed in by reference rather than being
cloned.
2010-03-16 20:09:13 -07:00
isaacs 943b2c61a8 Make evalcx work like it's supposed to.
1. Move the context->Enter() call so that the global obj is available for writing.
2. On success, copy the modified global out to the sandbox object.
3. Don't copy functions in either direction.  They have scope and closures, and make for craziness when trying to keep contexts separate.
4. Only do the ->ToObject->Clone() on objects, so that simple values stay simple.
5. Update the test so that it tests all this stuff.
2010-03-16 10:27:47 -07:00
Tim-Smart ae10a48383 Initial implementation of process.evalcx 2010-03-12 08:22:48 -08:00