More CanGc fixes: Range, Event, gpu error, Header (#33774)

* Propagate CanGc parameter in Range

Signed-off-by: webbeef <me@webbeef.org>

* Propagate CanGc parameter in gpu code and dependencies

Signed-off-by: webbeef <me@webbeef.org>

* Propagate CanGc parameter in Header and dependencies

Signed-off-by: webbeef <me@webbeef.org>

* Propagate CanGc parameter in Event and dependencies

Signed-off-by: webbeef <me@webbeef.org>

* Propagate CanGc parameter in rtcdatachannel

Signed-off-by: webbeef <me@webbeef.org>

* Propagate CanGc parameter in servoparser

Signed-off-by: webbeef <me@webbeef.org>

---------

Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
webbeef 2024-10-10 08:51:22 -07:00 committed by GitHub
parent 8c56cbdab2
commit f9a06d62a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 92 additions and 85 deletions

View file

@ -279,6 +279,7 @@ impl RTCPeerConnection {
atom!("negotiationneeded"),
EventBubbles::DoesNotBubble,
EventCancelable::NotCancelable,
CanGc::note(),
);
event.upcast::<Event>().fire(self.upcast());
}
@ -335,9 +336,9 @@ impl RTCPeerConnection {
match event {
DataChannelEvent::Open => channel.on_open(),
DataChannelEvent::Close => channel.on_close(),
DataChannelEvent::Error(error) => channel.on_error(error),
DataChannelEvent::Error(error) => channel.on_error(error, can_gc),
DataChannelEvent::OnMessage(message) => channel.on_message(message, can_gc),
DataChannelEvent::StateChange(state) => channel.on_state_change(state),
DataChannelEvent::StateChange(state) => channel.on_state_change(state, can_gc),
DataChannelEvent::NewChannel => unreachable!(),
}
},
@ -383,6 +384,7 @@ impl RTCPeerConnection {
atom!("icegatheringstatechange"),
EventBubbles::DoesNotBubble,
EventCancelable::NotCancelable,
CanGc::note(),
);
event.upcast::<Event>().fire(self.upcast());
@ -423,6 +425,7 @@ impl RTCPeerConnection {
atom!("iceconnectionstatechange"),
EventBubbles::DoesNotBubble,
EventCancelable::NotCancelable,
CanGc::note(),
);
event.upcast::<Event>().fire(self.upcast());
}
@ -445,6 +448,7 @@ impl RTCPeerConnection {
atom!("signalingstatechange"),
EventBubbles::DoesNotBubble,
EventCancelable::NotCancelable,
CanGc::note(),
);
event.upcast::<Event>().fire(self.upcast());
}
@ -761,7 +765,7 @@ impl RTCPeerConnectionMethods for RTCPeerConnection {
// Step 6
for (_, val) in self.data_channels.borrow().iter() {
val.on_state_change(DataChannelState::Closed);
val.on_state_change(DataChannelState::Closed, CanGc::note());
}
// Step 7-10