Move V8 Context from one Isolate to another

243 views
Skip to first unread message

Ivan P.

unread,
Mar 1, 2015, 3:29:49 PM3/1/15
to v8-u...@googlegroups.com
Does anybody know - is there an easy way to move some v8::Conext that belongs to some v8::Isolate to another v8::Isolate, preserving complete current state? 
Or at least make its copy/clone in the another v8::Isolate.

Yang Guo

unread,
Mar 4, 2015, 2:52:32 AM3/4/15
to v8-u...@googlegroups.com
A context is too deeply entangled into the isolate it belongs to, so moving the context but not the isolate is basically impossible with the current V8.

Ivan Pizhenko

unread,
Mar 5, 2015, 12:58:45 PM3/5/15
to v8-u...@googlegroups.com

What about making copy/clone of context?

4 бер. 2015 09:52, користувач "Yang Guo" <yan...@chromium.org> написав:

> --
> --
> v8-users mailing list
> v8-u...@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to a topic in the Google Groups "v8-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-users/Hy-Z-i52K8I/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to v8-users+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Flying Jester

unread,
Mar 5, 2015, 4:44:06 PM3/5/15
to v8-u...@googlegroups.com
What exactly are you trying to accomplish with this?

Copying a context would be a huge operation, if it's possible at all (I don't think it is).

You are almost certainly better off encapsulating the state you want in JSON or through some API you come up with yourself, and then loading that in a new context.

Ivan Pizhenko

unread,
Mar 29, 2015, 6:45:27 AM3/29/15
to v8-u...@googlegroups.com
Thank you for the good idea. This approach with JSON sounds like what I need to accomplish my task.
Reply all
Reply to author
Forward
0 new messages