I want to use only a single v8::Context for my whole application, so that I 
can access registered callbacks from everywhere. I tried simple always 
using v8::Context::GetCurrent() but I crashes if I haven't created a 
context before manually. To create a new context, I can use 
v8::Context::New() but I want to call I only, if there isn't a current 
context already.

I tried checking if the returned handle is emtpy but instead of returning 
an empty handle, it just crashes.

v8::Handle<v8::Context> handle = v8::Context::GetCurrent();
if(!handle)
{
    handle = v8::Context::New();
}

So how can I check if there is a current context already? Or is there a 
better way to access functions bound to various contexts from within a 
single script?

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to