mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
CanGc fixes in messageport.rs & workerglobalscope.rs (#34003)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
7ad8822d94
commit
fd6c100489
5 changed files with 7 additions and 6 deletions
|
@ -322,12 +322,12 @@ impl MessagePortMethods for MessagePort {
|
|||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#handler-messageport-onmessage>
|
||||
fn GetOnmessage(&self) -> Option<Rc<EventHandlerNonNull>> {
|
||||
fn GetOnmessage(&self, can_gc: CanGc) -> Option<Rc<EventHandlerNonNull>> {
|
||||
if self.detached.get() {
|
||||
return None;
|
||||
}
|
||||
let eventtarget = self.upcast::<EventTarget>();
|
||||
eventtarget.get_event_handler_common("message", CanGc::note())
|
||||
eventtarget.get_event_handler_common("message", can_gc)
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#handler-messageport-onmessage>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue