mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
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
This commit is contained in:
parent
6f70e6e72b
commit
7c2e7c6608
44 changed files with 1576 additions and 1348 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue