diff options
author | tanishka <109246904+taniishkaaa@users.noreply.github.com> | 2024-10-22 15:38:55 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-22 10:08:55 +0000 |
commit | 7015e0fb5f1a63ed13a5b07b056036e6e7adbc16 (patch) | |
tree | 0e1cb385daf84a1776ee7a5d2006b90b68e2404f /components/script/script_module.rs | |
parent | 575e8855294a9ee2094b110a7c1fea868e69251e (diff) | |
download | servo-7015e0fb5f1a63ed13a5b07b056036e6e7adbc16.tar.gz servo-7015e0fb5f1a63ed13a5b07b056036e6e7adbc16.zip |
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>
Diffstat (limited to 'components/script/script_module.rs')
-rw-r--r-- | components/script/script_module.rs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/components/script/script_module.rs b/components/script/script_module.rs index 5c6c992f73a..9bba80a051a 100644 --- a/components/script/script_module.rs +++ b/components/script/script_module.rs @@ -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, + ); } } } |