Skip to content

Commit 0bcf1b2

Browse files
committed
fix: silly mistake 🥹
1 parent 66b8f46 commit 0bcf1b2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

crates/base/src/deno_runtime.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,12 @@ impl DenoRuntime {
386386
}
387387

388388
let mut js_runtime = &mut self.js_runtime;
389+
390+
unsafe { js_runtime.v8_isolate().enter() };
391+
let mut js_runtime = scopeguard::guard(&mut js_runtime, |it| unsafe {
392+
it.v8_isolate().exit();
393+
});
394+
389395
let mod_result_rx = js_runtime.mod_evaluate(self.main_module_id);
390396
let is_user_worker = self.conf.is_user_worker();
391397

@@ -415,11 +421,6 @@ impl DenoRuntime {
415421
let get_current_cpu_time_ns_fn =
416422
|| get_thread_time().context("can't get current thread time");
417423

418-
unsafe { js_runtime.v8_isolate().enter() };
419-
let mut js_runtime = scopeguard::guard(&mut js_runtime, |it| unsafe {
420-
it.v8_isolate().exit();
421-
});
422-
423424
send_cpu_metrics_fn(CPUUsageMetrics::Enter(thread_id));
424425

425426
current_cpu_time_ns = match get_current_cpu_time_ns_fn() {

0 commit comments

Comments
 (0)