summaryrefslogtreecommitdiff
path: root/core/examples
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-06-12 10:53:24 -0700
committerGitHub <noreply@github.com>2019-06-12 10:53:24 -0700
commit2a5138a5166f0945d5fda68c89fa8e23c66fb681 (patch)
tree9086bdf89de1a8e077d74e0a38fb664d1be906db /core/examples
parent8693d0e0a7d7ce1e4533aef30c1a735276e3009b (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.rs5
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);