File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -386,6 +386,12 @@ impl DenoRuntime {
386
386
}
387
387
388
388
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
+
389
395
let mod_result_rx = js_runtime. mod_evaluate ( self . main_module_id ) ;
390
396
let is_user_worker = self . conf . is_user_worker ( ) ;
391
397
@@ -415,11 +421,6 @@ impl DenoRuntime {
415
421
let get_current_cpu_time_ns_fn =
416
422
|| get_thread_time ( ) . context ( "can't get current thread time" ) ;
417
423
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
-
423
424
send_cpu_metrics_fn ( CPUUsageMetrics :: Enter ( thread_id) ) ;
424
425
425
426
current_cpu_time_ns = match get_current_cpu_time_ns_fn ( ) {
You can’t perform that action at this time.
0 commit comments