diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2019-06-12 10:53:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-12 10:53:24 -0700 |
commit | 2a5138a5166f0945d5fda68c89fa8e23c66fb681 (patch) | |
tree | 9086bdf89de1a8e077d74e0a38fb664d1be906db /core/examples | |
parent | 8693d0e0a7d7ce1e4533aef30c1a735276e3009b (diff) |
Remove Config struct from core (#2502)
It's unnecessary indirection and is preventing the ability to easily
pass isolate references into the dispatch and dyn_import closures.
Note: this changes how StartupData::Script is executed. It's no longer done
during Isolate::new() but rather lazily on first poll or execution.
Diffstat (limited to 'core/examples')
-rw-r--r-- | core/examples/http_bench.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/examples/http_bench.rs b/core/examples/http_bench.rs index 757e9a3b7..e8c5ec1b7 100644 --- a/core/examples/http_bench.rs +++ b/core/examples/http_bench.rs @@ -179,9 +179,8 @@ fn main() { filename: "http_bench.js", }); - let mut config = deno::Config::default(); - config.dispatch(dispatch); - let isolate = deno::Isolate::new(startup_data, config); + let mut isolate = deno::Isolate::new(startup_data, false); + isolate.set_dispatch(dispatch); isolate.then(|r| { js_check(r); |