feat(libwebrtc): implement the rtc::RTCCertificate destructor #17704
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/17704"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-11-09T11:10:15Z.
What
Implements the
rtc::RTCCertificatedestructor in libwebrtc. Upstream defaults it in rtc_certificate.cc; the WebRTC notice and BSD licence head the file.Same code at both bounding revisions. I compared M127 (e0b28a6a81) with M134 (8d78f5de6c):
rtc_certificate.his byte-identical.ref_counted_base.hdiffers only by an added include.ssl_identity.hdiffers only outsideSSLIdentity: thekRsaDefaultModSizevalue and a removed free function.Layout.
RTCCertificateisfinalwith the non-polymorphicRefCountedNonVirtualbase, so it has no vtable. Thestd::atomic<int>count is at 0 andconst std::unique_ptr<SSLIdentity> identity_at 8, 16 bytes in all.Destruction. The identity is deleted through its virtual deleting destructor. That is slot 1, after the complete destructor, because
~SSLIdentityis the first virtual function of the base-lessSSLIdentity. #17454 deletesAudioDecoder::ParseResult's frame the same way.No implemented export creates a certificate yet, so this destructor matters once one does. The debt entry says so.
Tested
Windows 11, MinGW GCC Release build.
guest_webrtc_rtc_certificateis new andguest_webrtc_crypto_optionsstill passes. The new test checks:As a negative control, using slot 0 fails the test.
tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.py --branchmerged all 22 overlapping pull requests cleanly. It could not compare #14212, #15189 and #17691, which already conflict withmain; none touchesRTCCertificate. The branch also merges cleanly with #17698 and #17703.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)