-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add v8::Isolate::snapshot_creator_from_existing_snapshot API #973
feat: add v8::Isolate::snapshot_creator_from_existing_snapshot API #973
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allocate StartupData data in C++ and fill it in Rust.
We'll address that, once we got working end-to-end prototype in |
ba12696
to
66d427e
Compare
/// is no way to provide a global object template since we do not create | ||
/// a new global object from template, but we can reuse a global object. | ||
pub fn from_snapshot<'s>( | ||
scope: &mut HandleScope<'s, ()>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the scope here? Can this just take an &mut Isolate
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In most cases you need to use scope
immediately after calling this function, I think it's not worth the complexity.
existing_blob
to SnapshotCreator
constructorThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This commit adds "v8::Isolate::snapshot_creator_from_existing_snapshot" API,
that allows to create a new snapshot from already existing snapshot.
Following APIs were added as well: