diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-09-10 09:57:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 09:57:45 -0400 |
commit | 7c2e7c660804afca823d60e6496aa853f75db16c (patch) | |
tree | b7746b181c1564c6b1abd2e906662f9e6b008417 /op_crates | |
parent | 6f70e6e72ba2d5c1de7495adac37c1e4f4e86b24 (diff) |
Use gotham-like state for ops (#7385)
Provides a concrete state type that can be dynamically added. This is necessary for op crates.
* renames BasicState to OpState
* async ops take `Rc<RefCell<OpState>>`
* sync ops take `&mut OpState`
* removes `OpRegistry`, `OpRouter` traits
* `get_error_class_fn` moved to OpState
* ResourceTable moved to OpState
Diffstat (limited to 'op_crates')
-rw-r--r-- | op_crates/web/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/op_crates/web/lib.rs b/op_crates/web/lib.rs index f98dfe7c4..03107524a 100644 --- a/op_crates/web/lib.rs +++ b/op_crates/web/lib.rs @@ -33,7 +33,6 @@ pub fn get_declaration() -> PathBuf { #[cfg(test)] mod tests { use deno_core::js_check; - use deno_core::BasicState; use deno_core::JsRuntime; use deno_core::StartupData; use futures::future::lazy; @@ -49,8 +48,7 @@ mod tests { } fn setup() -> JsRuntime { - let mut isolate = - JsRuntime::new(BasicState::new(), StartupData::None, false); + let mut isolate = JsRuntime::new(StartupData::None, false); crate::init(&mut isolate); isolate } |