Mark CompileFunction as a potential GC operation. (#33937)

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2024-10-21 08:29:50 -04:00 committed by GitHub
parent 9acb25521e
commit dc03d1f3e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 35 additions and 19 deletions

View file

@ -318,8 +318,9 @@ macro_rules! define_event_handler(
fn $getter(&self) -> Option<::std::rc::Rc<$handler>> {
use crate::dom::bindings::inheritance::Castable;
use crate::dom::eventtarget::EventTarget;
use crate::script_runtime::CanGc;
let eventtarget = self.upcast::<EventTarget>();
eventtarget.get_event_handler_common(stringify!($event_type))
eventtarget.get_event_handler_common(stringify!($event_type), CanGc::note())
}
fn $setter(&self, listener: Option<::std::rc::Rc<$handler>>) {