mirror of
https://github.com/denoland/deno.git
synced 2025-07-24 13:44:08 +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
|
@ -14,7 +14,6 @@ pub static UNSTABLE_NS_LIB: &str = include_str!("dts/lib.deno.unstable.d.ts");
|
|||
#[test]
|
||||
fn cli_snapshot() {
|
||||
let mut isolate = deno_core::JsRuntime::new(
|
||||
deno_core::BasicState::new(),
|
||||
deno_core::StartupData::Snapshot(deno_core::Snapshot::Static(CLI_SNAPSHOT)),
|
||||
false,
|
||||
);
|
||||
|
@ -32,7 +31,6 @@ fn cli_snapshot() {
|
|||
#[test]
|
||||
fn compiler_snapshot() {
|
||||
let mut isolate = deno_core::JsRuntime::new(
|
||||
deno_core::BasicState::new(),
|
||||
deno_core::StartupData::Snapshot(deno_core::Snapshot::Static(
|
||||
COMPILER_SNAPSHOT,
|
||||
)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue