mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
CanGc fixes from EventTarget::fire_event (#33985)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
bb4932026c
commit
ea875f0a51
35 changed files with 155 additions and 115 deletions
|
@ -128,9 +128,9 @@ impl Worker {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn dispatch_simple_error(address: TrustedWorkerAddress) {
|
||||
pub fn dispatch_simple_error(address: TrustedWorkerAddress, can_gc: CanGc) {
|
||||
let worker = address.root();
|
||||
worker.upcast().fire_event(atom!("error"));
|
||||
worker.upcast().fire_event(atom!("error"), can_gc);
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#dom-dedicatedworkerglobalscope-postmessage>
|
||||
|
@ -301,6 +301,6 @@ impl WorkerMethods for Worker {
|
|||
impl TaskOnce for SimpleWorkerErrorHandler<Worker> {
|
||||
#[allow(crown::unrooted_must_root)]
|
||||
fn run_once(self) {
|
||||
Worker::dispatch_simple_error(self.addr);
|
||||
Worker::dispatch_simple_error(self.addr, CanGc::note());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue