commit 5783c32b891d9a9a6baf9b846fe9bf1325c6eda7
parent 7f14824be5063d127cc47b0f1b43e635bd7aa6ef
Author: Dan Baker <dbaker@mozilla.com>
Date: Mon, 27 Oct 2025 14:00:32 -0600
Bug 1995393 - Vendor libwebrtc from a3294ca4e0
Upstream commit: https://webrtc.googlesource.com/src/+/a3294ca4e0e3ca838d224a2afda3c140f2650b86
Cleanup field trial WebRTC-SetReadyToSendFalseIfSendFail
No issues with the fix has been reported, thus cleanup the killswitch.
Bug: webrtc:361124449
Change-Id: Id7ed12e1bfa03e835b47cc86316553d8b2f9b153
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/406540
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45449}
Diffstat:
5 files changed, 4 insertions(+), 49 deletions(-)
diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor
@@ -1,4 +1,4 @@
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
-libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T19:35:39.571378+00:00.
+libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T20:00:16.371215+00:00.
# base of lastest vendoring
-de4667eb4f
+a3294ca4e0
diff --git a/third_party/libwebrtc/experiments/field_trials.py b/third_party/libwebrtc/experiments/field_trials.py
@@ -167,9 +167,6 @@ ACTIVE_FIELD_TRIALS: FrozenSet[FieldTrial] = frozenset([
FieldTrial('WebRTC-RtcEventLogEncodeNetEqSetMinimumDelayKillSwitch',
42225058,
date(2024, 4, 1)),
- FieldTrial('WebRTC-SetReadyToSendFalseIfSendFail',
- 361124449,
- date(2024, 12, 1)),
FieldTrial('WebRTC-SimulcastEncoderAdapter-DropUnalignedResolution',
415329365,
date(2025, 11, 2)),
diff --git a/third_party/libwebrtc/pc/rtp_transport.cc b/third_party/libwebrtc/pc/rtp_transport.cc
@@ -164,14 +164,6 @@ bool RtpTransport::SendPacket(bool rtcp,
int ret = transport->SendPacket(packet->cdata<char>(), packet->size(),
options, flags);
if (ret != static_cast<int>(packet->size())) {
- if (set_ready_to_send_false_if_send_fail_) {
- // TODO: webrtc:361124449 - Remove SetReadyToSend if field trial
- // WebRTC-SetReadyToSendFalseIfSendFail succeed 2024-12-01.
- if (transport->GetError() == ENOTCONN) {
- RTC_LOG(LS_WARNING) << "Got ENOTCONN from transport.";
- SetReadyToSend(rtcp, false);
- }
- }
return false;
}
return true;
diff --git a/third_party/libwebrtc/pc/rtp_transport.h b/third_party/libwebrtc/pc/rtp_transport.h
@@ -45,9 +45,7 @@ class RtpTransport : public RtpTransportInternal {
RtpTransport& operator=(const RtpTransport&) = delete;
RtpTransport(bool rtcp_mux_enabled, const FieldTrialsView& field_trials)
- : set_ready_to_send_false_if_send_fail_(
- field_trials.IsEnabled("WebRTC-SetReadyToSendFalseIfSendFail")),
- rtcp_mux_enabled_(rtcp_mux_enabled) {}
+ : rtcp_mux_enabled_(rtcp_mux_enabled) {}
bool rtcp_mux_enabled() const override { return rtcp_mux_enabled_; }
void SetRtcpMuxEnabled(bool enable) override;
@@ -123,7 +121,6 @@ class RtpTransport : public RtpTransportInternal {
bool IsTransportWritable();
- const bool set_ready_to_send_false_if_send_fail_;
bool rtcp_mux_enabled_;
PacketTransportInternal* rtp_packet_transport_ = nullptr;
diff --git a/third_party/libwebrtc/pc/rtp_transport_unittest.cc b/third_party/libwebrtc/pc/rtp_transport_unittest.cc
@@ -363,8 +363,7 @@ TEST(RtpTransportTest, DontSignalUnhandledRtpPayloadType) {
}
TEST(RtpTransportTest, DontChangeReadyToSendStateOnSendFailure) {
- // ReadyToSendState should only care about if transport is writable unless the
- // field trial WebRTC-SetReadyToSendFalseIfSendFail/Enabled/ is set.
+ // ReadyToSendState should only care about if transport is writable.
RtpTransport transport(kMuxEnabled, CreateTestFieldTrials());
TransportObserver observer(&transport);
@@ -385,36 +384,6 @@ TEST(RtpTransportTest, DontChangeReadyToSendStateOnSendFailure) {
EXPECT_EQ(observer.ready_to_send_signal_count(), 1);
}
-TEST(RtpTransportTest, RecursiveSetSendDoesNotCrash) {
- const int kShortTimeout = 100;
- test::RunLoop loop;
-
- RtpTransport transport(
- kMuxEnabled,
- CreateTestFieldTrials("WebRTC-SetReadyToSendFalseIfSendFail/Enabled/"));
- FakePacketTransport fake_rtp("fake_rtp");
- transport.SetRtpPacketTransport(&fake_rtp);
- TransportObserver observer(&transport);
- observer.SetActionOnReadyToSend([&](bool ready) {
- const AsyncSocketPacketOptions options;
- const int flags = 0;
- CopyOnWriteBuffer rtp_data(kRtpData, kRtpLen);
- transport.SendRtpPacket(&rtp_data, options, flags);
- });
- // The fake RTP will have no destination, so will return -1.
- fake_rtp.SetError(ENOTCONN);
- fake_rtp.SetWritable(true);
- // At this point, only the initial ready-to-send is observed.
- EXPECT_TRUE(observer.ready_to_send());
- EXPECT_EQ(observer.ready_to_send_signal_count(), 1);
- // After the wait, the ready-to-send false is observed.
- EXPECT_THAT(WaitUntil([&] { return observer.ready_to_send_signal_count(); },
- ::testing::Eq(2),
- {.timeout = TimeDelta::Millis(kShortTimeout)}),
- IsRtcOk());
- EXPECT_FALSE(observer.ready_to_send());
-}
-
TEST(RtpTransportTest, RecursiveOnSentPacketDoesNotCrash) {
const int kShortTimeout = 100;
test::RunLoop loop;