commit 24fb53906a02afbddf018e11b7ed1552b4d34d2d parent 8e58de8907695500ab92ca3a0a98a723ef92567d Author: Michael Froman <mfroman@mozilla.com> Date: Wed, 8 Oct 2025 21:46:14 -0500 Bug 1993083 - Vendor libwebrtc from 5682d46450 Upstream commit: https://webrtc.googlesource.com/src/+/5682d46450322d82d19d16ac6a4d6c0c7c3148d8 Tighten environment_construction poison Poison concrete class for FieldTrials to prevent webrtc internal code create own field trials. Poison task queue factory for ios and android as exception are now explicitly marked. Bug: webrtc:42220378 Change-Id: I768fef6411c250075d4f4ac0292196f33cd018b4 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/393563 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/main@{#45084} Diffstat:
9 files changed, 21 insertions(+), 18 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 /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc -libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T02:45:00.414650+00:00. +libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T02:46:05.159240+00:00. # base of lastest vendoring -be5e37d326 +5682d46450 diff --git a/third_party/libwebrtc/api/BUILD.gn b/third_party/libwebrtc/api/BUILD.gn @@ -1735,6 +1735,11 @@ rtc_source_set("field_trials_view") { rtc_library("field_trials") { visibility = [ "*" ] + + # Internally webrtc shouldn't create or modify field trials, and should use + # FieldTrials through the FieldTrialsView interface that is usually propagated + # with Environment. + poisonous = [ "environment_construction" ] sources = [ "field_trials.cc", "field_trials.h", diff --git a/third_party/libwebrtc/api/task_queue/BUILD.gn b/third_party/libwebrtc/api/task_queue/BUILD.gn @@ -88,12 +88,11 @@ rtc_library("default_task_queue_factory") { # it as a dependency. if (!build_with_mozilla) { visibility = [ "*" ] - if (!is_ios && !is_android) { - # Internally webrtc shouldn't rely on any specific TaskQueue implementation - # and should create TaskQueue using TaskQueueFactory interface. - # TaskQueueFactory interface can be propagated with Environment. - poisonous = [ "environment_construction" ] - } + + # Internally webrtc shouldn't rely on any specific TaskQueue implementation + # and should create TaskQueue using TaskQueueFactory interface. + # TaskQueueFactory interface can be propagated with Environment. + poisonous = [ "environment_construction" ] sources = [ "default_task_queue_factory.h" ] deps = [ ":task_queue", diff --git a/third_party/libwebrtc/modules/video_coding/timing/BUILD.gn b/third_party/libwebrtc/modules/video_coding/timing/BUILD.gn @@ -89,7 +89,6 @@ rtc_library("timestamp_extrapolator") { "timestamp_extrapolator.h", ] deps = [ - "../../../api:field_trials", "../../../api:field_trials_view", "../../../api/units:time_delta", "../../../api/units:timestamp", diff --git a/third_party/libwebrtc/moz-patch-stack/p0001.patch b/third_party/libwebrtc/moz-patch-stack/p0001.patch @@ -75,7 +75,7 @@ index 1565aeb592..fd77e776cd 100644 "api/transport/rtp:corruption_detection_message_unittest", "api/video/test:rtc_api_video_unittests", diff --git a/api/BUILD.gn b/api/BUILD.gn -index 2e5f1a06a9..0b996dab6c 100644 +index 2cd7560d6c..1525c634b2 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -888,8 +888,6 @@ rtc_source_set("simulated_network_api") { diff --git a/third_party/libwebrtc/moz-patch-stack/s0027.patch b/third_party/libwebrtc/moz-patch-stack/s0027.patch @@ -203,7 +203,7 @@ index fd77e776cd..9d79e5e129 100644 } diff --git a/api/BUILD.gn b/api/BUILD.gn -index 0b996dab6c..bb73b93245 100644 +index 1525c634b2..05a8d4fd17 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -44,6 +44,9 @@ rtc_library("enable_media") { @@ -433,7 +433,7 @@ index 0000000000..45194f5ace + +#endif // API_RTP_SENDER_SETPARAMETERS_CALLBACK_H_ diff --git a/api/task_queue/BUILD.gn b/api/task_queue/BUILD.gn -index 9f10f0afc6..c1c917abb2 100644 +index 10a8cb8b5d..e5d40da756 100644 --- a/api/task_queue/BUILD.gn +++ b/api/task_queue/BUILD.gn @@ -29,6 +29,7 @@ rtc_library("task_queue") { diff --git a/third_party/libwebrtc/moz-patch-stack/s0053.patch b/third_party/libwebrtc/moz-patch-stack/s0053.patch @@ -13,7 +13,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/f097eb8cbd8b7686c 2 files changed, 9 insertions(+) diff --git a/api/task_queue/BUILD.gn b/api/task_queue/BUILD.gn -index c1c917abb2..de937ccf7e 100644 +index e5d40da756..7930cd7d39 100644 --- a/api/task_queue/BUILD.gn +++ b/api/task_queue/BUILD.gn @@ -29,6 +29,11 @@ rtc_library("task_queue") { diff --git a/third_party/libwebrtc/moz-patch-stack/s0084.patch b/third_party/libwebrtc/moz-patch-stack/s0084.patch @@ -50,7 +50,7 @@ index 0dd380a70b..4f48c1a06c 100644 Set(std::make_unique<RtcEventLogNull>()); } diff --git a/api/task_queue/BUILD.gn b/api/task_queue/BUILD.gn -index de937ccf7e..15b0878bbb 100644 +index 7930cd7d39..6a9ce52d7f 100644 --- a/api/task_queue/BUILD.gn +++ b/api/task_queue/BUILD.gn @@ -83,6 +83,10 @@ rtc_library("task_queue_test") { @@ -62,9 +62,9 @@ index de937ccf7e..15b0878bbb 100644 +# it as a dependency. +if (!build_with_mozilla) { visibility = [ "*" ] - if (!is_ios && !is_android) { - # Internally webrtc shouldn't rely on any specific TaskQueue implementation -@@ -107,6 +111,7 @@ rtc_library("default_task_queue_factory") { + + # Internally webrtc shouldn't rely on any specific TaskQueue implementation +@@ -106,6 +110,7 @@ rtc_library("default_task_queue_factory") { sources += [ "default_task_queue_factory_stdlib.cc" ] deps += [ "../../rtc_base:rtc_task_queue_stdlib" ] } diff --git a/third_party/libwebrtc/moz-patch-stack/s0103.patch b/third_party/libwebrtc/moz-patch-stack/s0103.patch @@ -126,7 +126,7 @@ index 74f7c78e12..f5aa3cc9fe 100644 "Generated during 'gn gen' by //BUILD.gn.", "", diff --git a/api/BUILD.gn b/api/BUILD.gn -index bb73b93245..1c1487a7ed 100644 +index 05a8d4fd17..a25df3f4c8 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -8,8 +8,8 @@