V8 Snapshot Magic Number

96 views
Skip to first unread message

Ronald Fenner

unread,
Aug 31, 2024, 3:02:36 AM8/31/24
to v8-dev
Could I request exposing the magic number used in snapshots as a function call or exporting the variable that holds it . It'd be nice to ask the library what's current number is as I've noticed it's a macro that aggregates a number of stuff together to build it.

I ask so that i can inspect the magic number to determine if the snapshot works with the included runtime before passing it to V8 to use.
Also I plan on using a custom snapshot file where the magic number at the start will just be 0 so as it identify it a non V8 one.

Camillo Bruni

unread,
Sep 2, 2024, 2:14:50 PM9/2/24
to v8-...@googlegroups.com
Hi,
StartupData::IsValid should do the same without exposing the internal data.
We currently don't expose the version number in the StartupData, but you can get some of it via v8::V8::GetVersion().

cheers, Camillo

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/b46d3b8c-61e3-495b-b62b-19cb0794330cn%40googlegroups.com.
Camillo Bruni | Software Engineer, V8 | Google Germany GmbH | Erika-Mann Str. 33, 80636 München 

Registergericht und -nummer: Hamburg, HRB 86891 | Sitz der Gesellschaft: Hamburg | Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Diese E-Mail ist vertraulich. Falls Ssie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.  This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.
Reply all
Reply to author
Forward
0 new messages