tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit d7792eb45b0b8d057a8a0781f8f8f812d5da45fc
parent 11e80dbaf916c0c8a47ef9541b92a16e488f06a7
Author: Dan Baker <dbaker@mozilla.com>
Date:   Mon, 27 Oct 2025 13:27:12 -0600

Bug 1995393 - Vendor libwebrtc from b93e2b78f3

Upstream commit: https://webrtc.googlesource.com/src/+/b93e2b78f3fd6dec0331f309ab52af25038542d0
    VoiceEngine takes Environment from Call

    Rather than piecemeal accessing environment stuff from Call,
    VoiceEngine classes take the whole environment from there.
    This avoids use of the trials() accessor in Call.

    Bug: webrtc:440271885
    Change-Id: I9d4fecf7f81beeb6616a14c406378947f1648418
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/406120
    Auto-Submit: Harald Alvestrand <hta@webrtc.org>
    Commit-Queue: Harald Alvestrand <hta@webrtc.org>
    Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45444}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/media/engine/webrtc_voice_engine.cc | 14+++++++++-----
Mthird_party/libwebrtc/media/engine/webrtc_voice_engine.h | 2++
3 files changed, 13 insertions(+), 7 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:02:31.587770+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T19:26:57.727641+00:00. # base of lastest vendoring -d142f35c7e +b93e2b78f3 diff --git a/third_party/libwebrtc/media/engine/webrtc_voice_engine.cc b/third_party/libwebrtc/media/engine/webrtc_voice_engine.cc @@ -851,7 +851,8 @@ class WebRtcVoiceSendChannel::WebRtcAudioSendStream : public AudioSource::Sink { const std::optional<AudioCodecPairId> codec_pair_id, scoped_refptr<FrameEncryptorInterface> frame_encryptor, const CryptoOptions& crypto_options) - : adaptive_ptime_config_(call->trials()), + : env_(call->env()), + adaptive_ptime_config_(env_.field_trials()), call_(call), config_(send_transport), max_send_bitrate_bps_(max_send_bitrate_bps), @@ -1087,7 +1088,7 @@ class WebRtcVoiceSendChannel::WebRtcAudioSendStream : public AudioSource::Sink { RTCError SetRtpParameters(const RtpParameters& parameters, SetParametersCallback callback) { RTCError error = CheckRtpParametersInvalidModificationAndValues( - rtp_parameters_, parameters, call_->trials()); + rtp_parameters_, parameters, env_.field_trials()); if (!error.ok()) { return InvokeSetParametersCallback(callback, error); } @@ -1245,6 +1246,7 @@ class WebRtcVoiceSendChannel::WebRtcAudioSendStream : public AudioSource::Sink { int NumPreferredChannels() const override { return num_encoded_channels_; } + const Environment env_; const AdaptivePtimeConfig adaptive_ptime_config_; SequenceChecker worker_thread_checker_; RaceChecker audio_capture_race_checker_; @@ -1277,6 +1279,7 @@ WebRtcVoiceSendChannel::WebRtcVoiceSendChannel( Call* call, AudioCodecPairId codec_pair_id) : MediaChannelUtil(call->network_thread(), config.enable_dscp), + env_(call->env()), worker_thread_(call->worker_thread()), engine_(engine), call_(call), @@ -1373,7 +1376,7 @@ bool WebRtcVoiceSendChannel::SetSenderParameters( std::vector<RtpExtension> filtered_extensions = FilterRtpExtensions(params.extensions, RtpExtension::IsSupportedForAudio, - true, call_->trials()); + true, env_.field_trials()); if (send_rtp_extensions_ != filtered_extensions) { send_rtp_extensions_.swap(filtered_extensions); for (auto& it : send_streams_) { @@ -2112,6 +2115,7 @@ WebRtcVoiceReceiveChannel::WebRtcVoiceReceiveChannel( Call* call, AudioCodecPairId codec_pair_id) : MediaChannelUtil(call->network_thread(), config.enable_dscp), + env_(call->env()), worker_thread_(call->worker_thread()), engine_(engine), call_(call), @@ -2154,7 +2158,7 @@ bool WebRtcVoiceReceiveChannel::SetReceiverParameters( } std::vector<RtpExtension> filtered_extensions = FilterRtpExtensions(params.extensions, RtpExtension::IsSupportedForAudio, - false, call_->trials()); + false, env_.field_trials()); if (recv_rtp_extensions_ != filtered_extensions) { recv_rtp_extensions_.swap(filtered_extensions); recv_rtp_extension_map_ = RtpHeaderExtensionMap(recv_rtp_extensions_); @@ -2579,7 +2583,7 @@ void WebRtcVoiceReceiveChannel::OnPacketReceived( // applied directly in RtpTransport::DemuxPacket; packet.IdentifyExtensions(recv_rtp_extension_map_); if (!packet.arrival_time().IsFinite()) { - packet.set_arrival_time(call_->env().clock().CurrentTime()); + packet.set_arrival_time(env_.clock().CurrentTime()); } call_->Receiver()->DeliverRtpPacket( diff --git a/third_party/libwebrtc/media/engine/webrtc_voice_engine.h b/third_party/libwebrtc/media/engine/webrtc_voice_engine.h @@ -285,6 +285,7 @@ class WebRtcVoiceSendChannel final : public MediaChannelUtil, bool SetMaxSendBitrate(int bps); void SetupRecording(); + const Environment& env_; TaskQueueBase* const worker_thread_; ScopedTaskSafety task_safety_; SequenceChecker network_thread_checker_{SequenceChecker::kDetached}; @@ -433,6 +434,7 @@ class WebRtcVoiceReceiveChannel final // unsignaled anymore (i.e. it is now removed, or signaled), and return true. bool MaybeDeregisterUnsignaledRecvStream(uint32_t ssrc); + const Environment& env_; TaskQueueBase* const worker_thread_; ScopedTaskSafety task_safety_; SequenceChecker network_thread_checker_{SequenceChecker::kDetached};