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

@ -28,7 +28,7 @@ use crate::dom::bindings::trace::RootedTraceableBox;
use crate::dom::bindings::transferable::Transferable;
use crate::dom::eventtarget::EventTarget;
use crate::dom::globalscope::GlobalScope;
use crate::script_runtime::JSContext as SafeJSContext;
use crate::script_runtime::{CanGc, JSContext as SafeJSContext};
#[dom_struct]
/// The MessagePort used in the DOM.
@ -327,7 +327,7 @@ impl MessagePortMethods for MessagePort {
return None;
}
let eventtarget = self.upcast::<EventTarget>();
eventtarget.get_event_handler_common("message")
eventtarget.get_event_handler_common("message", CanGc::note())
}
/// <https://html.spec.whatwg.org/multipage/#handler-messageport-onmessage>