diff --git a/crates/wasmtime/src/instance.rs b/crates/wasmtime/src/instance.rs index f69b0be36a..2ca3aa421c 100644 --- a/crates/wasmtime/src/instance.rs +++ b/crates/wasmtime/src/instance.rs @@ -163,7 +163,7 @@ impl Instance { let host_info = Box::new({ let frame_info_registration = module.register_frame_info(); - store.register_jit_code(module.compiled_module().jit_code_ranges()); + store.register_jit_code(&module); store.register_stack_maps(&module); frame_info_registration }); diff --git a/crates/wasmtime/src/runtime.rs b/crates/wasmtime/src/runtime.rs index a617520b0b..3132b05d7c 100644 --- a/crates/wasmtime/src/runtime.rs +++ b/crates/wasmtime/src/runtime.rs @@ -945,7 +945,8 @@ impl Store { .any(|(start, end)| *start <= addr && addr < *end) } - pub(crate) fn register_jit_code(&self, mut ranges: impl Iterator) { + pub(crate) fn register_jit_code(&self, module: &Module) { + let mut ranges = module.compiled_module().jit_code_ranges(); // Checking of we already registered JIT code ranges by searching // first range start. match ranges.next() {