diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-10-15 16:01:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-15 16:01:01 +0200 |
commit | e32719c2915aee9055327609ef03cf9bfc2b1785 (patch) | |
tree | 8894c93aa320ba3aa0a57637cf584f6f95dd807e /core/modules.rs | |
parent | 4ea4d3ad603ca06591e33592724cd935afb0185b (diff) |
refactor(core): use isolate get_data/set_data instead of slots (#16286)
Diffstat (limited to 'core/modules.rs')
-rw-r--r-- | core/modules.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/modules.rs b/core/modules.rs index 65b3852d9..8d0ae9733 100644 --- a/core/modules.rs +++ b/core/modules.rs @@ -5,6 +5,7 @@ use crate::error::generic_error; use crate::module_specifier::ModuleSpecifier; use crate::resolve_import; use crate::resolve_url; +use crate::JsRuntime; use crate::OpState; use anyhow::Error; use futures::future::FutureExt; @@ -125,10 +126,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 = tc_scope - .get_slot::<Rc<RefCell<ModuleMap>>>() - .unwrap() - .clone(); + let module_map = JsRuntime::module_map(tc_scope); let handle = v8::Global::<v8::Module>::new(tc_scope, module); let value_handle = module_map |