mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
CanGc fixes in errorevent.rs (#33960)
* CanGc fixes in errorevent.rs Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> * Allow too_many_arguments to avoid lint error Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com> --------- Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
@@ -541,7 +541,7 @@ impl ModuleTree {
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub fn report_error(&self, global: &GlobalScope) {
|
||||
pub fn report_error(&self, global: &GlobalScope, can_gc: CanGc) {
|
||||
let module_error = self.rethrow_error.borrow();
|
||||
|
||||
if let Some(exception) = &*module_error {
|
||||
@@ -552,7 +552,12 @@ impl ModuleTree {
|
||||
exception.handle(),
|
||||
ExceptionStackBehavior::Capture,
|
||||
);
|
||||
report_pending_exception(*GlobalScope::get_cx(), true, InRealm::Entered(&ar));
|
||||
report_pending_exception(
|
||||
*GlobalScope::get_cx(),
|
||||
true,
|
||||
InRealm::Entered(&ar),
|
||||
can_gc,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user