script: Mark callback methods with CanGc. (#35753)

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-03-03 07:17:25 -05:00 committed by GitHub
parent 3d320fa96a
commit 5650fa2e79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 133 additions and 67 deletions

View file

@ -1034,9 +1034,11 @@ impl TestBindingMethods<crate::DomTypeHolder> for TestBinding {
}
}
impl Callback for SimpleHandler {
fn callback(&self, cx: SafeJSContext, v: HandleValue, realm: InRealm, _can_gc: CanGc) {
fn callback(&self, cx: SafeJSContext, v: HandleValue, realm: InRealm, can_gc: CanGc) {
let global = GlobalScope::from_safe_context(cx, realm);
let _ = self.handler.Call_(&*global, v, ExceptionHandling::Report);
let _ = self
.handler
.Call_(&*global, v, ExceptionHandling::Report, can_gc);
}
}
}