Fix formatting.

This commit is contained in:
Josh Matthews 2023-02-16 23:33:24 -05:00
parent 5e5669b945
commit 9ea1399c30
4 changed files with 7 additions and 15 deletions

View file

@ -424,8 +424,7 @@ impl ModuleTree {
let cx = GlobalScope::get_cx();
let _ac = JSAutoRealm::new(*cx, *global.reflector().get_jsobject());
let compile_options =
unsafe { CompileOptionsWrapper::new(*cx, url.as_str(), 1) };
let compile_options = unsafe { CompileOptionsWrapper::new(*cx, url.as_str(), 1) };
unsafe {
rooted!(in(*cx) let mut module_script = CompileModule1(
@ -438,10 +437,7 @@ impl ModuleTree {
warn!("fail to compile module script of {}", url);
rooted!(in(*cx) let mut exception = UndefinedValue());
assert!(JS_GetPendingException(
*cx,
&mut exception.handle_mut()
));
assert!(JS_GetPendingException(*cx, &mut exception.handle_mut()));
JS_ClearPendingException(*cx);
return Err(RethrowError(RootedTraceableBox::from_box(Heap::boxed(
@ -483,10 +479,7 @@ impl ModuleTree {
warn!("fail to link & instantiate module");
rooted!(in(*cx) let mut exception = UndefinedValue());
assert!(JS_GetPendingException(
*cx,
&mut exception.handle_mut()
));
assert!(JS_GetPendingException(*cx, &mut exception.handle_mut()));
JS_ClearPendingException(*cx);
Err(RethrowError(RootedTraceableBox::from_box(Heap::boxed(