0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2025-02-07 23:06:30 -05:00

allow V8Inspector::create_stack_trace with empty local (#1684)

This commit is contained in:
Divy Srivastava 2025-01-29 20:49:15 +05:30 committed by GitHub
parent 7cd928aa44
commit 5dfb2f9035
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -1041,12 +1041,12 @@ impl V8Inspector {
pub fn create_stack_trace(
&mut self,
stack_trace: Local<StackTrace>,
stack_trace: Option<Local<StackTrace>>,
) -> UniquePtr<V8StackTrace> {
unsafe {
UniquePtr::from_raw(v8_inspector__V8Inspector__createStackTrace(
self,
&*stack_trace,
stack_trace.map_or(null(), |v| &*v),
))
}
}

View file

@ -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,