git: da9086bb2bf7 - 2025Q1 - www/firefox: update to 136.0 (rc1)

From: Christoph Moench-Tegeder <cmt_at_FreeBSD.org>
Date: Mon, 24 Feb 2025 22:00:17 UTC
The branch 2025Q1 has been updated by cmt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=da9086bb2bf726f079b5046e6bbbe3d129fe2459

commit da9086bb2bf726f079b5046e6bbbe3d129fe2459
Author:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
AuthorDate: 2025-02-24 21:45:11 +0000
Commit:     Christoph Moench-Tegeder <cmt@FreeBSD.org>
CommitDate: 2025-02-24 21:59:16 +0000

    www/firefox: update to 136.0 (rc1)
    
    Release Notes (soon):
      https://www.mozilla.org/en-US/firefox/136.0/releasenotes/
    
    Switches to bundles ICU, because the one in 2025Q1 is too old and
    the uplift would be too messy.
    
    While here, catch up with previously unmerged change bf57fa930359
    
    (cherry picked from commit c1a1b28d9f494603f1036e421234bbd3b7594829)
---
 www/firefox/Makefile                               |    11 +-
 www/firefox/distinfo                               |     6 +-
 www/firefox/files/patch-bug1559213                 |   131 -
 www/firefox/files/patch-bug1948776                 |    50 +
 .../patch-ipc_glue_SharedMemoryPlatform__posix.cpp |    21 -
 .../files/patch-ipc_glue_SharedMemory__posix.cpp   |    21 -
 www/firefox/files/patch-libwebrtc-generated        | 14264 ++++++++-----------
 ...toolkit_components_processtools_procinfo__bsd.c |   118 -
 8 files changed, 5849 insertions(+), 8773 deletions(-)

diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index 8ea9f631778d..fc7e38783d8d 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	firefox
-DISTVERSION=	135.0.1
+DISTVERSION=	136.0
 PORTEPOCH=	2
 CATEGORIES=	www wayland
 MASTER_SITES=	MOZILLA/${PORTNAME}/releases/${DISTVERSION}${DISTVERSIONSUFFIX}/source \
@@ -11,12 +11,11 @@ COMMENT=	Web browser based on the browser portion of Mozilla
 WWW=		https://www.mozilla.com/firefox
 
 BUILD_DEPENDS=	nspr>=4.32:devel/nspr \
-		nss>=3.107:security/nss \
-		icu>=73.1:devel/icu \
+		nss>=3.108:security/nss \
 		libevent>=2.1.8:devel/libevent \
 		harfbuzz>=10.1.0:print/harfbuzz \
 		graphite2>=1.3.14:graphics/graphite2 \
-		png>=1.6.44:graphics/png \
+		png>=1.6.45:graphics/png \
 		dav1d>=1.0.0:multimedia/dav1d \
 		libvpx>=1.15.0:multimedia/libvpx \
 		${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
@@ -28,8 +27,8 @@ BUILD_DEPENDS=	nspr>=4.32:devel/nspr \
 
 USE_GECKO=	gecko
 CONFLICTS_INSTALL=	firefox-esr
-USE_MOZILLA=	-sqlite
-CFLAGS_powerpc64le=	-DSQLITE_BYTEORDER=1234
+# we have to use the builtin icu as devel/icu is too old on 2025Q1
+USE_MOZILLA=	-icu -sqlite
 # work around bindgen not finding ICU, e.g.
 # dist/include/mozilla/intl/ICU4CGlue.h:8:10: fatal error: 'unicode/uenum.h' file not found, err: true
 CONFIGURE_ENV+=	BINDGEN_CFLAGS="-I${LOCALBASE}/include"
diff --git a/www/firefox/distinfo b/www/firefox/distinfo
index e887e40184eb..98bc055a54cb 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1739788027
-SHA256 (firefox-135.0.1.source.tar.xz) = 74fbdfddce3be390f3f03194a4e398b30d0a69754e1542a59d7f2b38bac37906
-SIZE (firefox-135.0.1.source.tar.xz) = 599617332
+TIMESTAMP = 1740431558
+SHA256 (firefox-136.0.source.tar.xz) = 7083752ac7beb253f87609606f29513803a4b601ecebdee59233266d675eb604
+SIZE (firefox-136.0.source.tar.xz) = 607000784
diff --git a/www/firefox/files/patch-bug1559213 b/www/firefox/files/patch-bug1559213
deleted file mode 100644
index ead3425fa70b..000000000000
--- a/www/firefox/files/patch-bug1559213
+++ /dev/null
@@ -1,131 +0,0 @@
-commit 25a5572d5cd137aa6d893e09a00bd39908a59a18
-Author: Christoph Moench-Tegeder <cmt@burggraben.net>
-Date:   Tue Sep 10 22:23:32 2024 +0200
-
-    based on:
-     commit 717bba28411c
-     Author: Jory A. Pratt <anarchy@gentoo.org>
-     Date:   Thu Jun 13 11:53:00 2019 -0700
-    
-         Bug 1559213 - Allow to use system av1 libs instead of bundled.
-
-diff --git config/external/moz.build config/external/moz.build
-index a24b470396cf..547f5f5c9e04 100644
---- config/external/moz.build
-+++ config/external/moz.build
-@@ -40,8 +40,9 @@ if not CONFIG["MOZ_SYSTEM_LIBVPX"]:
-     external_dirs += ["media/libvpx"]
- 
- if CONFIG["MOZ_AV1"]:
--    external_dirs += ["media/libaom"]
--    external_dirs += ["media/libdav1d"]
-+    if not CONFIG["MOZ_SYSTEM_AV1"]:
-+        external_dirs += ["media/libaom"]
-+        external_dirs += ["media/libdav1d"]
- 
- if not CONFIG["MOZ_SYSTEM_PNG"]:
-     external_dirs += ["media/libpng"]
-diff --git dom/media/platforms/moz.build dom/media/platforms/moz.build
-index 61536cc6e225..29cf635bbb44 100644
---- dom/media/platforms/moz.build
-+++ dom/media/platforms/moz.build
-@@ -71,6 +71,11 @@ if CONFIG["MOZ_AV1"]:
-         "agnostic/AOMDecoder.cpp",
-         "agnostic/DAV1DDecoder.cpp",
-     ]
-+    if CONFIG['MOZ_SYSTEM_AV1']:
-+        CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
-+        OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
-+        CXXFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
-+        OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
- 
- if CONFIG["MOZ_OMX"]:
-     EXPORTS += [
-diff --git media/ffvpx/libavcodec/moz.build media/ffvpx/libavcodec/moz.build
-index 6f09049a6068..90a82a19a9d1 100644
---- media/ffvpx/libavcodec/moz.build
-+++ media/ffvpx/libavcodec/moz.build
-@@ -119,10 +119,16 @@ if not CONFIG['MOZ_FFVPX_AUDIOONLY']:
-         'vp9recon.c',
-         'vpx_rac.c',
-     ]
--    USE_LIBS += [
--        'dav1d',
--        'media_libdav1d_asm',
--    ]
-+    if CONFIG["MOZ_SYSTEM_AV1"]:
-+        CFLAGS += CONFIG['MOZ_SYSTEM_LIBDAV1D_CFLAGS']
-+        OS_LIBS += CONFIG['MOZ_SYSTEM_LIBDAV1D_LIBS']
-+        CFLAGS += CONFIG['MOZ_SYSTEM_LIBAOM_CFLAGS']
-+        OS_LIBS += CONFIG['MOZ_SYSTEM_LIBAOM_LIBS']
-+    else:
-+        USE_LIBS += [
-+            'dav1d',
-+            'media_libdav1d_asm',
-+        ]
-     if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
-         LOCAL_INCLUDES += ['/media/mozva']
-         SOURCES += [
-diff --git media/libopus/moz.build media/libopus/moz.build
-index 943aee79ee99..4ad07e3e98af 100644
---- media/libopus/moz.build
-+++ media/libopus/moz.build
-@@ -58,7 +58,7 @@ if not CONFIG["MOZ_SAMPLE_TYPE_FLOAT32"]:
-     DEFINES["FIXED_POINT"] = 1
-     DEFINES["DISABLE_FLOAT_API"] = True
- 
--if CONFIG["OS_ARCH"] == "Linux":
-+if CONFIG["OS_ARCH"] in ("FreeBSD", "Linux"):
-     OS_LIBS += [
-         "m",
-     ]
-diff --git media/libvorbis/moz.build media/libvorbis/moz.build
-index cd17d4f89759..816edd72a000 100644
---- media/libvorbis/moz.build
-+++ media/libvorbis/moz.build
-@@ -45,7 +45,7 @@ LOCAL_INCLUDES += ['lib']
- if CONFIG['OS_ARCH'] == 'SunOS':
-     DEFINES['HAVE_ALLOCA_H'] = True
- 
--if CONFIG["OS_ARCH"] == "Linux":
-+if CONFIG["OS_ARCH"] in ("FreeBSD", "Linux"):
-     OS_LIBS += [
-         "m",
-     ]
-diff --git toolkit/moz.configure toolkit/moz.configure
-index 1f85d2831f2f..07294b93f850 100644
---- toolkit/moz.configure
-+++ toolkit/moz.configure
-@@ -883,7 +883,23 @@ def av1(value):
-         return True
- 
- 
--@depends(target, when=av1 & compile_environment)
-+option("--with-system-av1",
-+       help="Use system av1 (located with pkgconfig)")
-+
-+system_libaom_info = pkg_check_modules("MOZ_SYSTEM_LIBAOM", "aom >= 1.0.0",
-+                                       when="--with-system-av1")
-+
-+system_libdav1d_info = pkg_check_modules("MOZ_SYSTEM_LIBDAV1D", "dav1d >= 0.1.1",
-+                                         when="--with-system-av1")
-+
-+@depends(system_libaom_info, system_libdav1d_info)
-+def system_av1(system_libaom_info, system_libdav1d_info):
-+    has_av1_libs = False
-+    if system_libaom_info and system_libdav1d_info:
-+        has_av1_libs = True
-+    return has_av1_libs
-+
-+@depends(target, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment)
- def dav1d_asm(target):
-     if target.cpu in ("aarch64", "x86", "x86_64"):
-         return True
-@@ -899,6 +915,7 @@ set_config("MOZ_DAV1D_ASM", dav1d_asm)
- set_define("MOZ_DAV1D_ASM", dav1d_asm)
- set_config("MOZ_AV1", av1)
- set_define("MOZ_AV1", av1)
-+set_config("MOZ_SYSTEM_AV1", depends_if(system_av1)(lambda _: True))
- 
- # JXL Image Codec Support
- # ==============================================================
diff --git a/www/firefox/files/patch-bug1948776 b/www/firefox/files/patch-bug1948776
new file mode 100644
index 000000000000..86953f4e4472
--- /dev/null
+++ b/www/firefox/files/patch-bug1948776
@@ -0,0 +1,50 @@
+commit 43b044fe8adaccb46868ac00c70a4e7a5d354a9c
+Author: Christoph Moench-Tegeder <cmt@burggraben.net>
+
+    Bug 1948776 - handle non-existence of MAP_NORESERVE for FreeBSD, r=afranchuk,jld,nika
+    
+    The MAP_NORESERVE flag does not exist in FreeBSD. As the minimally-
+    invasive workaround, I decided to remove that flag directly in the
+    mmap() calls, instead of defining our own MAP_NORESERVE as 0
+    possibly far away and not obviously connected to these places.
+    
+    Differential Revision: https://phabricator.services.mozilla.com/D238531
+
+diff --git ipc/glue/SharedMemoryPlatform_posix.cpp ipc/glue/SharedMemoryPlatform_posix.cpp
+index 61121bcbaf8d..b31f2200e8e6 100644
+--- ipc/glue/SharedMemoryPlatform_posix.cpp
++++ ipc/glue/SharedMemoryPlatform_posix.cpp
+@@ -447,8 +447,12 @@ bool Platform::Protect(char* aAddr, size_t aSize, Access aAccess) {
+ }
+ 
+ void* Platform::FindFreeAddressSpace(size_t aSize) {
+-  void* memory = mmap(nullptr, aSize, PROT_NONE,
+-                      MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0);
++#ifndef __FreeBSD__
++  int flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE;
++#else
++  int flags = MAP_ANONYMOUS | MAP_PRIVATE;
++#endif
++  void* memory = mmap(nullptr, aSize, PROT_NONE, flags, -1, 0);
+   if (memory == MAP_FAILED) {
+     return nullptr;
+   }
+diff --git ipc/glue/SharedMemory_posix.cpp ipc/glue/SharedMemory_posix.cpp
+index da279f469237..9ed83af4b1f2 100644
+--- ipc/glue/SharedMemory_posix.cpp
++++ ipc/glue/SharedMemory_posix.cpp
+@@ -61,8 +61,12 @@ SharedMemory::Handle SharedMemory::CloneHandle(const Handle& aHandle) {
+ }
+ 
+ void* SharedMemory::FindFreeAddressSpace(size_t size) {
+-  void* memory = mmap(nullptr, size, PROT_NONE,
+-                      MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0);
++#ifndef __FreeBSD__
++  int flags = MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE;
++#else
++  int flags = MAP_ANONYMOUS | MAP_PRIVATE;
++#endif
++  void* memory = mmap(nullptr, size, PROT_NONE, flags, -1, 0);
+   if (memory == MAP_FAILED) {
+     return nullptr;
+   }
diff --git a/www/firefox/files/patch-ipc_glue_SharedMemoryPlatform__posix.cpp b/www/firefox/files/patch-ipc_glue_SharedMemoryPlatform__posix.cpp
deleted file mode 100644
index 2b16220e87ad..000000000000
--- a/www/firefox/files/patch-ipc_glue_SharedMemoryPlatform__posix.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-commit 30b15661a86e10fef4854dcb22e1d6dd6456e680
-Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
-
-    FreeBSD does not have MAP_NORESERVE
-
-diff --git ipc/glue/SharedMemoryPlatform_posix.cpp ipc/glue/SharedMemoryPlatform_posix.cpp
-index 017a7d29c9a3..2e88eeb11c5c 100644
---- ipc/glue/SharedMemoryPlatform_posix.cpp
-+++ ipc/glue/SharedMemoryPlatform_posix.cpp
-@@ -448,7 +448,11 @@ bool Platform::Protect(char* aAddr, size_t aSize, Access aAccess) {
- 
- void* Platform::FindFreeAddressSpace(size_t aSize) {
-   void* memory = mmap(nullptr, aSize, PROT_NONE,
-+#ifdef __FreeBSD__
-+                      MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
-+#else
-                       MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0);
-+#endif
-   if (memory == MAP_FAILED) {
-     return nullptr;
-   }
diff --git a/www/firefox/files/patch-ipc_glue_SharedMemory__posix.cpp b/www/firefox/files/patch-ipc_glue_SharedMemory__posix.cpp
deleted file mode 100644
index 767b663ee5ef..000000000000
--- a/www/firefox/files/patch-ipc_glue_SharedMemory__posix.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-commit bdd68dbe8130dcddde28581939ac50542f0b07ad
-Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
-
-    FreeBSD does not have MAP_NORESERVE
-
-diff --git ipc/glue/SharedMemory_posix.cpp ipc/glue/SharedMemory_posix.cpp
-index 73aaff1246c2..5ba7624f584d 100644
---- ipc/glue/SharedMemory_posix.cpp
-+++ ipc/glue/SharedMemory_posix.cpp
-@@ -62,7 +62,11 @@ SharedMemory::Handle SharedMemory::CloneHandle(const Handle& aHandle) {
- 
- void* SharedMemory::FindFreeAddressSpace(size_t size) {
-   void* memory = mmap(nullptr, size, PROT_NONE,
-+#ifdef __FreeBSD__
-+                      MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
-+#else
-                       MAP_ANONYMOUS | MAP_NORESERVE | MAP_PRIVATE, -1, 0);
-+#endif
-   if (memory == MAP_FAILED) {
-     return nullptr;
-   }
diff --git a/www/firefox/files/patch-libwebrtc-generated b/www/firefox/files/patch-libwebrtc-generated
index 3c977e38f457..7cc3320ba596 100644
--- a/www/firefox/files/patch-libwebrtc-generated
+++ b/www/firefox/files/patch-libwebrtc-generated
@@ -1,20 +1,19 @@
-commit 1a5ba8d67318c2e5dd83348bfc9d1d35db8421b9
+commit 05e619ebbe49c70dab8273ff9769da63ea1d8631
 Author: Christoph Moench-Tegeder <cmt@FreeBSD.org>
 
-    regenerate FreeBSD libwebrtc patch for Firefox 135
+    regenerate FreeBSD libwebrtc patch for Firefox 136
 
 diff --git third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build
-index a80e5f32ade2..d5a2be24fcbe 100644
+index 31e5e0cb14be..d54f6dbed565 100644
 --- third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build
 +++ third_party/libwebrtc/api/adaptation/resource_adaptation_api_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
 +DEFINES["USE_GLIB"] = "1"
 +DEFINES["USE_OZONE"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
-+DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
  DEFINES["WEBRTC_MOZILLA_BUILD"] = True
@@ -29,7 +28,7 @@ index a80e5f32ade2..d5a2be24fcbe 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,178 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -41,7 +40,6 @@ index a80e5f32ade2..d5a2be24fcbe 100644
 -    DEFINES["HAVE_SYS_UIO_H"] = True
 -    DEFINES["WEBRTC_ANDROID"] = True
 -    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_GNU_SOURCE"] = True
@@ -68,7 +66,6 @@ index a80e5f32ade2..d5a2be24fcbe 100644
 -    DEFINES["USE_NSS_CERTS"] = "1"
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_UDEV"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -83,7 +80,6 @@ index a80e5f32ade2..d5a2be24fcbe 100644
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_BSD"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
 -    DEFINES["_LARGEFILE64_SOURCE"] = True
@@ -215,17 +211,16 @@ index a80e5f32ade2..d5a2be24fcbe 100644
  
  Library("resource_adaptation_api_gn")
 diff --git third_party/libwebrtc/api/array_view_gn/moz.build third_party/libwebrtc/api/array_view_gn/moz.build
-index 25221b2af745..dfc948eba91e 100644
+index 84878ba9f99f..0a1c7b839dda 100644
 --- third_party/libwebrtc/api/array_view_gn/moz.build
 +++ third_party/libwebrtc/api/array_view_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
 +DEFINES["USE_GLIB"] = "1"
 +DEFINES["USE_OZONE"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
-+DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
  DEFINES["WEBRTC_MOZILLA_BUILD"] = True
@@ -240,7 +235,7 @@ index 25221b2af745..dfc948eba91e 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,108 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -252,7 +247,6 @@ index 25221b2af745..dfc948eba91e 100644
 -    DEFINES["HAVE_SYS_UIO_H"] = True
 -    DEFINES["WEBRTC_ANDROID"] = True
 -    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_GNU_SOURCE"] = True
@@ -279,7 +273,6 @@ index 25221b2af745..dfc948eba91e 100644
 -    DEFINES["USE_NSS_CERTS"] = "1"
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_UDEV"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -294,7 +287,6 @@ index 25221b2af745..dfc948eba91e 100644
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_BSD"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
 -    DEFINES["_LARGEFILE64_SOURCE"] = True
@@ -353,7 +345,7 @@ index 25221b2af745..dfc948eba91e 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -153,50 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -150,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -406,17 +398,16 @@ index 25221b2af745..dfc948eba91e 100644
 -
  Library("array_view_gn")
 diff --git third_party/libwebrtc/api/async_dns_resolver_gn/moz.build third_party/libwebrtc/api/async_dns_resolver_gn/moz.build
-index bf95db7b24ed..d4e55fe55732 100644
+index f8804e882e6e..b6efeac78e76 100644
 --- third_party/libwebrtc/api/async_dns_resolver_gn/moz.build
 +++ third_party/libwebrtc/api/async_dns_resolver_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
 +DEFINES["USE_GLIB"] = "1"
 +DEFINES["USE_OZONE"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
-+DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
  DEFINES["WEBRTC_MOZILLA_BUILD"] = True
@@ -431,7 +422,7 @@ index bf95db7b24ed..d4e55fe55732 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,119 +49,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,116 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -443,7 +434,6 @@ index bf95db7b24ed..d4e55fe55732 100644
 -    DEFINES["HAVE_SYS_UIO_H"] = True
 -    DEFINES["WEBRTC_ANDROID"] = True
 -    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_GNU_SOURCE"] = True
@@ -471,7 +461,6 @@ index bf95db7b24ed..d4e55fe55732 100644
 -    DEFINES["USE_NSS_CERTS"] = "1"
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_UDEV"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -486,7 +475,6 @@ index bf95db7b24ed..d4e55fe55732 100644
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_BSD"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
 -    DEFINES["_LARGEFILE64_SOURCE"] = True
@@ -552,7 +540,7 @@ index bf95db7b24ed..d4e55fe55732 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -161,50 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -158,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -605,17 +593,16 @@ index bf95db7b24ed..d4e55fe55732 100644
 -
  Library("async_dns_resolver_gn")
 diff --git third_party/libwebrtc/api/audio/aec3_config_gn/moz.build third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
-index 2c964a4fd025..f6f8fff6e3bc 100644
+index f79ef5c75c4d..daf2b9c13beb 100644
 --- third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
 +++ third_party/libwebrtc/api/audio/aec3_config_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
 +DEFINES["USE_GLIB"] = "1"
 +DEFINES["USE_OZONE"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
-+DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
  DEFINES["WEBRTC_MOZILLA_BUILD"] = True
@@ -630,7 +617,7 @@ index 2c964a4fd025..f6f8fff6e3bc 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,178 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -642,7 +629,6 @@ index 2c964a4fd025..f6f8fff6e3bc 100644
 -    DEFINES["HAVE_SYS_UIO_H"] = True
 -    DEFINES["WEBRTC_ANDROID"] = True
 -    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_GNU_SOURCE"] = True
@@ -669,7 +655,6 @@ index 2c964a4fd025..f6f8fff6e3bc 100644
 -    DEFINES["USE_NSS_CERTS"] = "1"
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_UDEV"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -684,7 +669,6 @@ index 2c964a4fd025..f6f8fff6e3bc 100644
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_BSD"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
 -    DEFINES["_LARGEFILE64_SOURCE"] = True
@@ -816,10 +800,10 @@ index 2c964a4fd025..f6f8fff6e3bc 100644
  
  Library("aec3_config_gn")
 diff --git third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
-index e02b226aca7f..744e4c8aa0de 100644
+index 4f58b0dfae3e..9311473ef1a8 100644
 --- third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
 +++ third_party/libwebrtc/api/audio/aec3_factory_gn/moz.build
-@@ -12,12 +12,22 @@ AllowCompilerWarnings()
+@@ -12,12 +12,21 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
@@ -827,7 +811,6 @@ index e02b226aca7f..744e4c8aa0de 100644
 +DEFINES["USE_OZONE"] = "1"
  DEFINES["WEBRTC_APM_DEBUG_DUMP"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
-+DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
  DEFINES["WEBRTC_MOZILLA_BUILD"] = True
@@ -842,7 +825,7 @@ index e02b226aca7f..744e4c8aa0de 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -44,189 +54,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -44,186 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -854,7 +837,6 @@ index e02b226aca7f..744e4c8aa0de 100644
 -    DEFINES["HAVE_SYS_UIO_H"] = True
 -    DEFINES["WEBRTC_ANDROID"] = True
 -    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_GNU_SOURCE"] = True
@@ -881,7 +863,6 @@ index e02b226aca7f..744e4c8aa0de 100644
 -    DEFINES["USE_NSS_CERTS"] = "1"
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_UDEV"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -900,7 +881,6 @@ index e02b226aca7f..744e4c8aa0de 100644
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_BSD"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
 -    DEFINES["_LARGEFILE64_SOURCE"] = True
@@ -1039,17 +1019,16 @@ index e02b226aca7f..744e4c8aa0de 100644
  
  Library("aec3_factory_gn")
 diff --git third_party/libwebrtc/api/audio/audio_device_gn/moz.build third_party/libwebrtc/api/audio/audio_device_gn/moz.build
-index 0fc7d750796a..9f6439e12a20 100644
+index acf6fe8822f4..956114463750 100644
 --- third_party/libwebrtc/api/audio/audio_device_gn/moz.build
 +++ third_party/libwebrtc/api/audio/audio_device_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
 +DEFINES["USE_GLIB"] = "1"
 +DEFINES["USE_OZONE"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
-+DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
  DEFINES["WEBRTC_MOZILLA_BUILD"] = True
@@ -1064,7 +1043,7 @@ index 0fc7d750796a..9f6439e12a20 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,111 +49,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,108 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -1076,7 +1055,6 @@ index 0fc7d750796a..9f6439e12a20 100644
 -    DEFINES["HAVE_SYS_UIO_H"] = True
 -    DEFINES["WEBRTC_ANDROID"] = True
 -    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_GNU_SOURCE"] = True
@@ -1103,7 +1081,6 @@ index 0fc7d750796a..9f6439e12a20 100644
 -    DEFINES["USE_NSS_CERTS"] = "1"
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_UDEV"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1118,7 +1095,6 @@ index 0fc7d750796a..9f6439e12a20 100644
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_BSD"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
 -    DEFINES["_LARGEFILE64_SOURCE"] = True
@@ -1177,7 +1153,7 @@ index 0fc7d750796a..9f6439e12a20 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -153,50 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -150,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -1230,17 +1206,16 @@ index 0fc7d750796a..9f6439e12a20 100644
 -
  Library("audio_device_gn")
 diff --git third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build
-index c0e06e7a7865..ca8fc7db5049 100644
+index 5506b2b799c0..f121290ac495 100644
 --- third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build
 +++ third_party/libwebrtc/api/audio/audio_frame_api_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
 +DEFINES["USE_GLIB"] = "1"
 +DEFINES["USE_OZONE"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
-+DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
  DEFINES["WEBRTC_MOZILLA_BUILD"] = True
@@ -1255,7 +1230,7 @@ index c0e06e7a7865..ca8fc7db5049 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -44,185 +54,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -44,182 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -1267,7 +1242,6 @@ index c0e06e7a7865..ca8fc7db5049 100644
 -    DEFINES["HAVE_SYS_UIO_H"] = True
 -    DEFINES["WEBRTC_ANDROID"] = True
 -    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_GNU_SOURCE"] = True
@@ -1294,7 +1268,6 @@ index c0e06e7a7865..ca8fc7db5049 100644
 -    DEFINES["USE_NSS_CERTS"] = "1"
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_UDEV"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1309,7 +1282,6 @@ index c0e06e7a7865..ca8fc7db5049 100644
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_BSD"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
 -    DEFINES["_LARGEFILE64_SOURCE"] = True
@@ -1448,17 +1420,16 @@ index c0e06e7a7865..ca8fc7db5049 100644
  
  Library("audio_frame_api_gn")
 diff --git third_party/libwebrtc/api/audio/audio_frame_processor_gn/moz.build third_party/libwebrtc/api/audio/audio_frame_processor_gn/moz.build
-index bc6ea25161c1..d586a04ef2ba 100644
+index 3b9b2a2dd8f1..f34df50bef47 100644
 --- third_party/libwebrtc/api/audio/audio_frame_processor_gn/moz.build
 +++ third_party/libwebrtc/api/audio/audio_frame_processor_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
 +DEFINES["USE_GLIB"] = "1"
 +DEFINES["USE_OZONE"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
-+DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
  DEFINES["WEBRTC_MOZILLA_BUILD"] = True
@@ -1473,7 +1444,7 @@ index bc6ea25161c1..d586a04ef2ba 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,107 +49,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,104 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -1485,7 +1456,6 @@ index bc6ea25161c1..d586a04ef2ba 100644
 -    DEFINES["HAVE_SYS_UIO_H"] = True
 -    DEFINES["WEBRTC_ANDROID"] = True
 -    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_GNU_SOURCE"] = True
@@ -1508,7 +1478,6 @@ index bc6ea25161c1..d586a04ef2ba 100644
 -    DEFINES["USE_NSS_CERTS"] = "1"
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_UDEV"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1523,7 +1492,6 @@ index bc6ea25161c1..d586a04ef2ba 100644
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_BSD"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
 -    DEFINES["_LARGEFILE64_SOURCE"] = True
@@ -1582,7 +1550,7 @@ index bc6ea25161c1..d586a04ef2ba 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -149,50 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -146,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -1635,17 +1603,16 @@ index bc6ea25161c1..d586a04ef2ba 100644
 -
  Library("audio_frame_processor_gn")
 diff --git third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build
-index cedd56ac791e..7d5115f48657 100644
+index 13f69cf28328..aca2a4d6a37f 100644
 --- third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build
 +++ third_party/libwebrtc/api/audio/audio_mixer_api_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
 +DEFINES["USE_GLIB"] = "1"
 +DEFINES["USE_OZONE"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
-+DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
  DEFINES["WEBRTC_MOZILLA_BUILD"] = True
@@ -1660,7 +1627,7 @@ index cedd56ac791e..7d5115f48657 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -39,118 +49,17 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -39,115 +48,17 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -1672,7 +1639,6 @@ index cedd56ac791e..7d5115f48657 100644
 -    DEFINES["HAVE_SYS_UIO_H"] = True
 -    DEFINES["WEBRTC_ANDROID"] = True
 -    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_GNU_SOURCE"] = True
@@ -1699,7 +1665,6 @@ index cedd56ac791e..7d5115f48657 100644
 -    DEFINES["USE_NSS_CERTS"] = "1"
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_UDEV"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1714,7 +1679,6 @@ index cedd56ac791e..7d5115f48657 100644
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_BSD"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
 -    DEFINES["_LARGEFILE64_SOURCE"] = True
@@ -1780,7 +1744,7 @@ index cedd56ac791e..7d5115f48657 100644
  
  if CONFIG["TARGET_CPU"] == "x86":
  
-@@ -160,50 +69,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
+@@ -157,50 +68,8 @@ if CONFIG["TARGET_CPU"] == "x86_64":
  
      DEFINES["WEBRTC_ENABLE_AVX2"] = True
  
@@ -1833,17 +1797,16 @@ index cedd56ac791e..7d5115f48657 100644
 -
  Library("audio_mixer_api_gn")
 diff --git third_party/libwebrtc/api/audio/audio_processing_gn/moz.build third_party/libwebrtc/api/audio/audio_processing_gn/moz.build
-index 10ae1f65fa9c..e4ababb74a87 100644
+index c7c012a9aa21..fb9329509240 100644
 --- third_party/libwebrtc/api/audio/audio_processing_gn/moz.build
 +++ third_party/libwebrtc/api/audio/audio_processing_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
 +DEFINES["USE_GLIB"] = "1"
 +DEFINES["USE_OZONE"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
-+DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
  DEFINES["WEBRTC_MOZILLA_BUILD"] = True
@@ -1858,7 +1821,7 @@ index 10ae1f65fa9c..e4ababb74a87 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,178 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -43,175 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -1870,7 +1833,6 @@ index 10ae1f65fa9c..e4ababb74a87 100644
 -    DEFINES["HAVE_SYS_UIO_H"] = True
 -    DEFINES["WEBRTC_ANDROID"] = True
 -    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_GNU_SOURCE"] = True
@@ -1897,7 +1859,6 @@ index 10ae1f65fa9c..e4ababb74a87 100644
 -    DEFINES["USE_NSS_CERTS"] = "1"
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_UDEV"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -1912,7 +1873,6 @@ index 10ae1f65fa9c..e4ababb74a87 100644
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_BSD"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
 -    DEFINES["_LARGEFILE64_SOURCE"] = True
@@ -2044,17 +2004,16 @@ index 10ae1f65fa9c..e4ababb74a87 100644
  
  Library("audio_processing_gn")
 diff --git third_party/libwebrtc/api/audio/audio_processing_statistics_gn/moz.build third_party/libwebrtc/api/audio/audio_processing_statistics_gn/moz.build
-index 061ff48b8485..3ee36df68faa 100644
+index 064122654c6f..9275b9e39050 100644
 --- third_party/libwebrtc/api/audio/audio_processing_statistics_gn/moz.build
 +++ third_party/libwebrtc/api/audio/audio_processing_statistics_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
 +DEFINES["USE_GLIB"] = "1"
 +DEFINES["USE_OZONE"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
-+DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
  DEFINES["WEBRTC_MOZILLA_BUILD"] = True
@@ -2069,7 +2028,7 @@ index 061ff48b8485..3ee36df68faa 100644
  
  FINAL_LIBRARY = "xul"
  
-@@ -43,174 +53,32 @@ if not CONFIG["MOZ_DEBUG"]:
+@@ -43,171 +52,32 @@ if not CONFIG["MOZ_DEBUG"]:
  if CONFIG["MOZ_DEBUG"] == "1":
  
      DEFINES["DYNAMIC_ANNOTATIONS_ENABLED"] = "1"
@@ -2081,7 +2040,6 @@ index 061ff48b8485..3ee36df68faa 100644
 -    DEFINES["HAVE_SYS_UIO_H"] = True
 -    DEFINES["WEBRTC_ANDROID"] = True
 -    DEFINES["WEBRTC_ANDROID_OPENSLES"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_GNU_SOURCE"] = True
@@ -2104,7 +2062,6 @@ index 061ff48b8485..3ee36df68faa 100644
 -    DEFINES["USE_NSS_CERTS"] = "1"
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_UDEV"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_LINUX"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
@@ -2119,7 +2076,6 @@ index 061ff48b8485..3ee36df68faa 100644
 -    DEFINES["USE_OZONE"] = "1"
 -    DEFINES["USE_X11"] = "1"
 -    DEFINES["WEBRTC_BSD"] = True
--    DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
 -    DEFINES["WEBRTC_POSIX"] = True
 -    DEFINES["_FILE_OFFSET_BITS"] = "64"
 -    DEFINES["_LARGEFILE64_SOURCE"] = True
@@ -2251,17 +2207,16 @@ index 061ff48b8485..3ee36df68faa 100644
  
  Library("audio_processing_statistics_gn")
 diff --git third_party/libwebrtc/api/audio/echo_control_gn/moz.build third_party/libwebrtc/api/audio/echo_control_gn/moz.build
-index f1cfe20bed12..a373bec2722f 100644
+index 67e90d93f334..9bb9eff44ed7 100644
 --- third_party/libwebrtc/api/audio/echo_control_gn/moz.build
 +++ third_party/libwebrtc/api/audio/echo_control_gn/moz.build
-@@ -12,11 +12,21 @@ AllowCompilerWarnings()
+@@ -12,11 +12,20 @@ AllowCompilerWarnings()
  DEFINES["ABSL_ALLOCATOR_NOTHROW"] = "1"
  DEFINES["RTC_DAV1D_IN_INTERNAL_DECODER_FACTORY"] = True
  DEFINES["RTC_ENABLE_VP9"] = True
 +DEFINES["USE_GLIB"] = "1"
 +DEFINES["USE_OZONE"] = "1"
 +DEFINES["WEBRTC_BSD"] = True
-+DEFINES["WEBRTC_ENABLE_LIBEVENT"] = True
  DEFINES["WEBRTC_ENABLE_PROTOBUF"] = "0"
  DEFINES["WEBRTC_LIBRARY_IMPL"] = True
  DEFINES["WEBRTC_MOZILLA_BUILD"] = True
@@ -2276,7 +2231,7 @@ index f1cfe20bed12..a373bec2722f 100644
*** 39826 LINES SKIPPED ***