diff --git a/src/inspector.rs b/src/inspector.rs index 53d74c1ddb..e70770f460 100644 --- a/src/inspector.rs +++ b/src/inspector.rs @@ -1041,12 +1041,12 @@ impl V8Inspector { pub fn create_stack_trace( &mut self, - stack_trace: Local, + stack_trace: Option>, ) -> UniquePtr { unsafe { UniquePtr::from_raw(v8_inspector__V8Inspector__createStackTrace( self, - &*stack_trace, + stack_trace.map_or(null(), |v| &*v), )) } } diff --git a/tests/test_api.rs b/tests/test_api.rs index d8c47caadf..ed284de72d 100644 --- a/tests/test_api.rs +++ b/tests/test_api.rs @@ -6847,7 +6847,7 @@ fn inspector_exception_thrown() { v8::String::new(&mut context_scope, "This is a test error").unwrap(); let exception = v8::Exception::error(&mut context_scope, exception_msg); let stack_trace = - v8::Exception::get_stack_trace(&mut context_scope, exception).unwrap(); + v8::Exception::get_stack_trace(&mut context_scope, exception); let stack_trace_ptr = inspector.create_stack_trace(stack_trace); let _id = inspector.exception_thrown( context,