Is it possible to save the current runtime execution in V8 and continue later, between process initializations?

83 views
Skip to first unread message

idleman

unread,
May 1, 2012, 2:08:46 PM5/1/12
to v8-u...@googlegroups.com
Hi all,

Is it possible to pause the current state in V8 and continue the execution later, between process initializations, so the user can close the program and start it later? Example so the user can restarts its computer without any need to re-run the complete script again. Is it possible?


Thanks in advance!

Peter Enerccio

unread,
May 1, 2012, 2:40:48 PM5/1/12
to v8-u...@googlegroups.com
I asked the same thing before and no one replied. I wouldnt get your hopes up.

2012/5/1 idleman <evo...@gmail.com>
Hi all,

Is it possible to pause the current state in V8 and continue the execution later, between process initializations, so the user can close the program and start it later? Example so the user can restarts its computer without any need to re-run the complete script again. Is it possible?


Thanks in advance!



--
Bc. Peter Vaňušanik
http://www.bishojo.tk

idleman

unread,
May 1, 2012, 9:01:48 PM5/1/12
to v8-u...@googlegroups.com
Well, in that case there is probably not possible, thanks anyway.

Stewart Mckinney

unread,
May 2, 2012, 11:44:29 AM5/2/12
to v8-u...@googlegroups.com
You can suspend a context by effectively not entering it, but you cant "save" the context to disk and then read it and remember its state. You can, however, write a routine that is called on quit that saves any state you are interested in into a flat file (like s ave file) and then have your initialization process read that file and re-initialize certain objects. However, saving the entire environment context is not possible. I actually don't know any language that can do this. (if you know one, let me know)

--

Peter Enerccio

unread,
May 2, 2012, 11:47:43 AM5/2/12
to v8-u...@googlegroups.com
Well, depends on how it is built. But what bout objects such as functions? How can you dump those? Or classes (ie objects)?

2012/5/2 Stewart Mckinney <lord...@gmail.com>
Reply all
Reply to author
Forward
0 new messages