diff --git a/core/ops_builtin_types.rs b/core/ops_builtin_types.rs index 19895c111..85d02ba33 100644 --- a/core/ops_builtin_types.rs +++ b/core/ops_builtin_types.rs @@ -80,7 +80,7 @@ pub fn op_is_module_namespace_object(value: &v8::Value) -> bool { value.is_module_namespace_object() } -#[op2(fast, no_side_effects)] +#[op2(fast, reentrant)] // may be invoked by `format_exception_cb` pub fn op_is_native_error(value: &v8::Value) -> bool { value.is_native_error() } diff --git a/core/runtime/tests/jsrealm.rs b/core/runtime/tests/jsrealm.rs index f77aa1290..366bb1696 100644 --- a/core/runtime/tests/jsrealm.rs +++ b/core/runtime/tests/jsrealm.rs @@ -25,6 +25,7 @@ fn test_set_format_exception_callback_realms() { format!( r#" Deno.core.ops.op_set_format_exception_callback((error) => {{ + Deno.core.isNativeError(error); // test reentrancy return `{realm_name} / ${{error}}`; }}); "#