mirror of
https://github.com/denoland/deno.git
synced 2025-02-01 20:25:12 -05:00
feat(core): allow async opcalls in snapshots (#10308)
This commit is contained in:
parent
201185f9fb
commit
c130cbb7b7
1 changed files with 3 additions and 3 deletions
|
@ -305,9 +305,7 @@ impl JsRuntime {
|
||||||
if !has_startup_snapshot {
|
if !has_startup_snapshot {
|
||||||
js_runtime.js_init();
|
js_runtime.js_init();
|
||||||
}
|
}
|
||||||
if !options.will_snapshot {
|
js_runtime.init_recv_cb();
|
||||||
js_runtime.init_recv_cb();
|
|
||||||
}
|
|
||||||
|
|
||||||
js_runtime
|
js_runtime
|
||||||
}
|
}
|
||||||
|
@ -432,7 +430,9 @@ impl JsRuntime {
|
||||||
// TODO(piscisaureus): The rusty_v8 type system should enforce this.
|
// TODO(piscisaureus): The rusty_v8 type system should enforce this.
|
||||||
state.borrow_mut().global_context.take();
|
state.borrow_mut().global_context.take();
|
||||||
|
|
||||||
|
// Drop v8::Global handles before snapshotting
|
||||||
std::mem::take(&mut state.borrow_mut().module_map);
|
std::mem::take(&mut state.borrow_mut().module_map);
|
||||||
|
std::mem::take(&mut state.borrow_mut().js_recv_cb);
|
||||||
|
|
||||||
let snapshot_creator = self.snapshot_creator.as_mut().unwrap();
|
let snapshot_creator = self.snapshot_creator.as_mut().unwrap();
|
||||||
let snapshot = snapshot_creator
|
let snapshot = snapshot_creator
|
||||||
|
|
Loading…
Add table
Reference in a new issue