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:
parent
7cd928aa44
commit
5dfb2f9035
2 changed files with 3 additions and 3 deletions
|
@ -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),
|
||||
))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue