From 50531026a84f9e61ff7be2f1a3a92a129cf30023 Mon Sep 17 00:00:00 2001 From: Domenico Rizzo Date: Wed, 18 Jun 2025 01:42:22 +0200 Subject: [PATCH] [#26488] Makes RTCPeerConnection weak referenceable thorugh Binding.conf (#37518) This PR fixes some mistakes introduced in https://github.com/servo/servo/pull/37332. Where Binding.conf and WeakReferenceable trait were used badly Testing: No test introduces Fixes: It fixes mistake introduced in the incrementally implementation of #26488 Signed-off-by: Domenico Rizzo --- components/script/dom/rtcpeerconnection.rs | 3 --- components/script_bindings/codegen/Bindings.conf | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/components/script/dom/rtcpeerconnection.rs b/components/script/dom/rtcpeerconnection.rs index 2282846dc7a..37ae21a910d 100644 --- a/components/script/dom/rtcpeerconnection.rs +++ b/components/script/dom/rtcpeerconnection.rs @@ -8,7 +8,6 @@ use std::rc::Rc; use dom_struct::dom_struct; use js::rust::HandleObject; -use script_bindings::weakref::WeakReferenceable; use servo_media::ServoMedia; use servo_media::streams::MediaStreamType; use servo_media::streams::registry::MediaStreamId; @@ -791,8 +790,6 @@ impl RTCPeerConnectionMethods for RTCPeerConnection { } } -impl WeakReferenceable for RTCPeerConnection {} - impl Convert for SessionDescription { fn convert(self) -> RTCSessionDescriptionInit { let type_ = match self.type_ { diff --git a/components/script_bindings/codegen/Bindings.conf b/components/script_bindings/codegen/Bindings.conf index 535294a462e..93691f3bd5f 100644 --- a/components/script_bindings/codegen/Bindings.conf +++ b/components/script_bindings/codegen/Bindings.conf @@ -559,13 +559,10 @@ DOMInterfaces = { 'canGc': ['Error', 'Redirect', 'Clone', 'CreateFromJson', 'Text', 'Blob', 'FormData', 'Json', 'ArrayBuffer', 'Headers', 'Bytes'], }, -'RTCDataChannel': { - 'weakReferenceable': True, -}, - 'RTCPeerConnection': { 'inRealms': ['AddIceCandidate', 'CreateAnswer', 'CreateOffer', 'SetLocalDescription', 'SetRemoteDescription'], 'canGc': ['Close', 'AddIceCandidate', 'CreateAnswer', 'CreateOffer', 'SetLocalDescription', 'SetRemoteDescription'], + 'weakReferenceable': True, }, 'RTCRtpSender': {