diff options
author | Matt Mastracci <matthew@mastracci.com> | 2023-05-28 13:13:53 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-28 19:13:53 +0000 |
commit | 429da4ee2d3cfd5dd0cf24d5f7953cc21bc878b4 (patch) | |
tree | c7713062058296153b0102977994c3788b798f92 /core/modules.rs | |
parent | b6a3f8f722db89bc136e91da598f581c5838d38e (diff) |
refactor(core): Refactor and re-organize code for easier maintenance (#19287)
Part of some work to refactor and decouple the various parts of core.
Diffstat (limited to 'core/modules.rs')
-rw-r--r-- | core/modules.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/modules.rs b/core/modules.rs index 5a9226b6c..174dadd2d 100644 --- a/core/modules.rs +++ b/core/modules.rs @@ -136,7 +136,7 @@ fn json_module_evaluation_steps<'a>( // SAFETY: `CallbackScope` can be safely constructed from `Local<Context>` let scope = &mut unsafe { v8::CallbackScope::new(context) }; let tc_scope = &mut v8::TryCatch::new(scope); - let module_map = JsRuntime::module_map(tc_scope); + let module_map = JsRuntime::module_map_from(tc_scope); let handle = v8::Global::<v8::Module>::new(tc_scope, module); let value_handle = module_map @@ -1963,7 +1963,7 @@ import "/a.js"; ] ); - let module_map_rc = JsRuntime::module_map(runtime.v8_isolate()); + let module_map_rc = runtime.module_map(); let modules = module_map_rc.borrow(); assert_eq!( @@ -2075,7 +2075,7 @@ import "/a.js"; assert_eq!(DISPATCH_COUNT.load(Ordering::Relaxed), 0); - let module_map_rc = JsRuntime::module_map(runtime.v8_isolate()); + let module_map_rc = runtime.module_map().clone(); let (mod_a, mod_b) = { let scope = &mut runtime.handle_scope(); @@ -2187,7 +2187,7 @@ import "/a.js"; ) .unwrap(); - let module_map_rc = JsRuntime::module_map(runtime.v8_isolate()); + let module_map_rc = runtime.module_map().clone(); let (mod_a, mod_b) = { let scope = &mut runtime.handle_scope(); @@ -2521,7 +2521,7 @@ import "/a.js"; ] ); - let module_map_rc = JsRuntime::module_map(runtime.v8_isolate()); + let module_map_rc = runtime.module_map(); let modules = module_map_rc.borrow(); assert_eq!( @@ -2601,7 +2601,7 @@ import "/a.js"; ] ); - let module_map_rc = JsRuntime::module_map(runtime.v8_isolate()); + let module_map_rc = runtime.module_map(); let modules = module_map_rc.borrow(); assert_eq!( @@ -2756,7 +2756,7 @@ if (import.meta.url != 'file:///main_with_code.js') throw Error(); vec!["file:///b.js", "file:///c.js", "file:///d.js"] ); - let module_map_rc = JsRuntime::module_map(runtime.v8_isolate()); + let module_map_rc = runtime.module_map(); let modules = module_map_rc.borrow(); assert_eq!( |