On Mon, Mar 17, 2014 at 3:15 PM, Jos Kuijpers <[email protected]> wrote:
> Hi All,
>
> I am working on my L8Framework, an Objective-C wrapper system for V8 (like
> the Apple JavaScriptCore Objective-C API, but then for V8).
> In my Property and Function callbacks, I need to have the Context it is run
> for: so for the object it applies to (the function called, the object who's
> property is set, etc).
>
> I can see two options to get it: using
> info.GetIsolate()->GetCurrentContext() or info.Holder()->CreationContext().
> Or maybe some other way.
>
> What would be the correct way to do this, to allow future multi-context,
> multi-isolate setups?
>
>
> Thanks in advance!

If I understand your question correctly, it's
v8::Isolate::GetCurrentContext() that you want.  That's the active
context a.k.a. the context that JS code is executing in when it calls
your function or property callback.

-- 
-- 
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/d/optout.

Reply via email to