Building v8_context_snapshot.bin

748 views
Skip to first unread message

geo...@amazon.com

unread,
Feb 6, 2018, 6:07:47 PM2/6/18
to headless-dev
I recently upleveled my workspace  and noticed when I run headless_shell I am getting an error like
#
# Fatal error in ../../v8/src/api.cc, line 8410
# Check failed: (isolate->snapshot_blob()) == nullptr.
#
which will cause my headless_shell to segfault.
I noticed that adding in a build flag use_v8_context_snapshot=false seemed to allow me to run the headless shell without issue.
I generated the v8_context_snapshot by building v8_context_snapshot_generator and running it pointing to the root of my output directory to generate the v8_context_snapshot.bin and everything seems to work.
What exactly is the purpose of this file? Is this the correct way to generate it? I have a headless_lib.pak file also in the root, which if I am not mistaken contains the snapshot_blob.bin that this file is generated from.

Sami Kyostila

unread,
Feb 8, 2018, 6:44:07 AM2/8/18
to geo...@amazon.com, headless-dev
Usually headless_shell is meant to be used with use_v8_context_snapshot=false (see build/args/headless.gn). However making the shell work with external v8 resources is pretty straightforward so I've uploaded a patch to do that: https://chromium-review.googlesource.com/c/chromium/src/+/906750

- Sami

--
You received this message because you are subscribed to the Google Groups "headless-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to headless-dev...@chromium.org.
To post to this group, send email to headle...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/headless-dev/2b4876f1-9347-4772-b1e8-db20c502d1d2%40chromium.org.
Reply all
Reply to author
Forward
0 new messages