> There is no way. New context means new built-in objects. Also 
> reattaching global does not change anything because built-ins are not
> on the global object itself. 

Holy Javascript Batman!  That explains a lot!
So where are they kept (the built-ins)? Are the hooked in via prototype 
chain to the global object? 

> If you want to reuse the same builtins you don't ultimately need a new
> context. Just use the same all the time.

Excellent!  So I can just create a new empty global object each time like 
this and attach to my existing context to give me the same built-ins but a 
clean global?
Persistent<Object> globalObject = Persistent<Object>::New(Object::New());

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to