mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Assert that we successfully got the pending exception
This commit is contained in:
parent
2d53192666
commit
ac1e02405d
1 changed files with 1 additions and 1 deletions
|
@ -138,7 +138,7 @@ fn run_json_data_algorithm(cx: *mut JSContext,
|
||||||
json_text.len() as u32,
|
json_text.len() as u32,
|
||||||
rval.handle_mut()) {
|
rval.handle_mut()) {
|
||||||
rooted!(in(cx) let mut exception = UndefinedValue());
|
rooted!(in(cx) let mut exception = UndefinedValue());
|
||||||
JS_GetPendingException(cx, exception.handle_mut());
|
assert!(JS_GetPendingException(cx, exception.handle_mut()));
|
||||||
JS_ClearPendingException(cx);
|
JS_ClearPendingException(cx);
|
||||||
return Ok(FetchedData::JSException(RootedTraceableBox::from_box(Heap::boxed(exception.get()))));
|
return Ok(FetchedData::JSException(RootedTraceableBox::from_box(Heap::boxed(exception.get()))));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue