mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
parent
202e7fa6ad
commit
edb7a0eead
7 changed files with 289 additions and 33 deletions
|
@ -300,9 +300,15 @@ impl MainWorker {
|
|||
let state_rc = CoreIsolate::state(&worker.isolate);
|
||||
let state = state_rc.borrow();
|
||||
let mut t = state.resource_table.borrow_mut();
|
||||
t.add("stdin", Box::new(stdin));
|
||||
t.add("stdout", Box::new(stdout));
|
||||
t.add("stderr", Box::new(stderr));
|
||||
if let Some(stream) = stdin {
|
||||
t.add("stdin", Box::new(stream));
|
||||
}
|
||||
if let Some(stream) = stdout {
|
||||
t.add("stdout", Box::new(stream));
|
||||
}
|
||||
if let Some(stream) = stderr {
|
||||
t.add("stderr", Box::new(stream));
|
||||
}
|
||||
}
|
||||
worker.execute("bootstrap.mainRuntime()")?;
|
||||
Ok(worker)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue