summaryrefslogtreecommitdiff
path: root/src/isolate.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/isolate.rs')
-rw-r--r--src/isolate.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/isolate.rs b/src/isolate.rs
index df13fca96..e222d280f 100644
--- a/src/isolate.rs
+++ b/src/isolate.rs
@@ -100,6 +100,15 @@ pub struct Metrics {
static DENO_INIT: std::sync::Once = std::sync::ONCE_INIT;
+fn empty() -> libdeno::deno_buf {
+ libdeno::deno_buf {
+ alloc_ptr: std::ptr::null_mut(),
+ alloc_len: 0,
+ data_ptr: std::ptr::null_mut(),
+ data_len: 0,
+ }
+}
+
impl Isolate {
pub fn new(
flags: flags::DenoFlags,
@@ -109,9 +118,9 @@ impl Isolate {
DENO_INIT.call_once(|| {
unsafe { libdeno::deno_init() };
});
-
+ let shared = empty(); // TODO Use shared for message passing.
let libdeno_isolate = unsafe {
- libdeno::deno_new(snapshot::deno_snapshot.clone(), pre_dispatch)
+ libdeno::deno_new(snapshot::deno_snapshot.clone(), shared, pre_dispatch)
};
// This channel handles sending async messages back to the runtime.
let (tx, rx) = mpsc::channel::<(i32, Buf)>();