mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
CanGc fixes in components/script/dom (#33880)
Signed-off-by: taniishkaaa <tanishkasingh2004@gmail.com>
This commit is contained in:
parent
72ff89620b
commit
cd7b66be58
12 changed files with 59 additions and 33 deletions
|
@ -90,7 +90,7 @@ impl WebRtcSignaller for RTCSignaller {
|
|||
let _ = self.task_source.queue_with_canceller(
|
||||
task!(on_ice_candidate: move || {
|
||||
let this = this.root();
|
||||
this.on_ice_candidate(candidate);
|
||||
this.on_ice_candidate(candidate, CanGc::note());
|
||||
}),
|
||||
&self.canceller,
|
||||
);
|
||||
|
@ -112,7 +112,7 @@ impl WebRtcSignaller for RTCSignaller {
|
|||
let _ = self.task_source.queue_with_canceller(
|
||||
task!(update_gathering_state: move || {
|
||||
let this = this.root();
|
||||
this.update_gathering_state(state);
|
||||
this.update_gathering_state(state, CanGc::note());
|
||||
}),
|
||||
&self.canceller,
|
||||
);
|
||||
|
@ -249,7 +249,7 @@ impl RTCPeerConnection {
|
|||
})
|
||||
}
|
||||
|
||||
fn on_ice_candidate(&self, candidate: IceCandidate) {
|
||||
fn on_ice_candidate(&self, candidate: IceCandidate, can_gc: CanGc) {
|
||||
if self.closed.get() {
|
||||
return;
|
||||
}
|
||||
|
@ -266,6 +266,7 @@ impl RTCPeerConnection {
|
|||
Some(&candidate),
|
||||
None,
|
||||
true,
|
||||
can_gc,
|
||||
);
|
||||
event.upcast::<Event>().fire(self.upcast());
|
||||
}
|
||||
|
@ -361,7 +362,7 @@ impl RTCPeerConnection {
|
|||
}
|
||||
|
||||
/// <https://www.w3.org/TR/webrtc/#update-ice-gathering-state>
|
||||
fn update_gathering_state(&self, state: GatheringState) {
|
||||
fn update_gathering_state(&self, state: GatheringState, can_gc: CanGc) {
|
||||
// step 1
|
||||
if self.closed.get() {
|
||||
return;
|
||||
|
@ -396,6 +397,7 @@ impl RTCPeerConnection {
|
|||
None,
|
||||
None,
|
||||
true,
|
||||
can_gc,
|
||||
);
|
||||
event.upcast::<Event>().fire(self.upcast());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue