diff --git a/ext/node/ops/require.rs b/ext/node/ops/require.rs index def1d97587..4f88c1913b 100644 --- a/ext/node/ops/require.rs +++ b/ext/node/ops/require.rs @@ -591,12 +591,14 @@ where } } -#[op2(fast)] -pub fn op_require_break_on_next_statement(state: &mut OpState) { - let inspector = state.borrow::>>(); - inspector - .borrow_mut() - .wait_for_session_and_break_on_next_statement() +#[op2(fast, reentrant)] +pub fn op_require_break_on_next_statement(state: Rc>) { + let inspector_rc = { + let state = state.borrow(); + state.borrow::>>().clone() + }; + let mut inspector = inspector_rc.borrow_mut(); + inspector.wait_for_session_and_break_on_next_statement() } fn url_to_file_path_string(url: &Url) -> Result {