mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
make report_pending_exception safe and adjust callers (#35351)
Signed-off-by: Nolen Scaife <nolen@scaife.org>
This commit is contained in:
parent
827012fc08
commit
df73d02932
8 changed files with 42 additions and 44 deletions
|
@ -593,20 +593,15 @@ impl ModuleTree {
|
|||
let module_error = self.rethrow_error.borrow();
|
||||
|
||||
if let Some(exception) = &*module_error {
|
||||
let ar = enter_realm(global);
|
||||
unsafe {
|
||||
let ar = enter_realm(global);
|
||||
JS_SetPendingException(
|
||||
*GlobalScope::get_cx(),
|
||||
exception.handle(),
|
||||
ExceptionStackBehavior::Capture,
|
||||
);
|
||||
report_pending_exception(
|
||||
*GlobalScope::get_cx(),
|
||||
true,
|
||||
InRealm::Entered(&ar),
|
||||
can_gc,
|
||||
);
|
||||
}
|
||||
report_pending_exception(GlobalScope::get_cx(), true, InRealm::Entered(&ar), can_gc);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue