I think crbug.com/v8/10500 will answer some of your questions. Short version: no, currently you can't snapshot a running isolate with arbitrary state. Also take a look at the d8 --stress-snapshot <https://source.chromium.org/chromium/chromium/src/+/master:v8/src/d8/d8.cc;l=3723;drc=6687e9201a1b0d2c9c81ad7e4dd113fb09547953> flag, which takes a snapshot after executing arbitrary JS but without guaranteeing that the resulting deserialized heap state is still executable (in many cases it won't be). Re. modules support, see crbug.com/v8/10855.
On Mon, Mar 8, 2021 at 8:35 PM Roey Berman <r...@temporal.io> wrote: > Hi, > > I'm trying to create a persistent v8 runtime where I can at any point take > a snapshot of a running isolate. > I'm wondering what the limitations of SnapshotCreator are. > I have only seen it being used for creating startup snapshots. > Is it possible to call SnapshotCreator.CreateBlob() multiple times on the > same instance? > I got a segfault when I tried that but I couldn't see anything the implies > that it shouldn't be safe in the docs. > Also, is it possible to load modules during snapshot creation? > > Thanks, > - Roey > > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > 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 v8-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/v8-users/afb077fd-4f2a-4cd0-8288-627343307eden%40googlegroups.com > <https://groups.google.com/d/msgid/v8-users/afb077fd-4f2a-4cd0-8288-627343307eden%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/CAH3p7oPOTf40rEO4XZ5-ybCQwZTtEShBBwEP-x_OyBuLuzTw7Q%40mail.gmail.com.