commit 0496eb8bf9acedf859ff6d2e13446475e1f245d6
parent 0ca94e5589afd25a0b1edf8dd1423de3589d8193
Author: Michael Froman <mfroman@mozilla.com>
Date: Thu, 9 Oct 2025 15:04:08 -0500
Bug 1993083 - Vendor libwebrtc from ad04aa1b2a
Upstream commit: https://webrtc.googlesource.com/src/+/ad04aa1b2ad4b6fd6fa139865979b8d21170aaf9
Disable mutex warning when intentionnaly creating a deadlock.
This is to unblock Chromium roll into WebRTC.
Change-Id: I14d2e71ca19b2b5583e87df0b95197ee0ed73b37
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/401020
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45173}
Diffstat:
2 files changed, 23 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-09T20:02:34.269719+00:00.
+libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T20:03:58.440946+00:00.
# base of lastest vendoring
-adf7d6e93b
+ad04aa1b2a
diff --git a/third_party/libwebrtc/modules/desktop_capture/win/window_capture_utils_unittest.cc b/third_party/libwebrtc/modules/desktop_capture/win/window_capture_utils_unittest.cc
@@ -28,6 +28,24 @@ namespace {
constexpr char kWindowThreadName[] = "window_capture_utils_test_thread";
const WCHAR kWindowTitle[] = L"Window Capture Utils Test";
+TEST(WindowCaptureUtilsTest, GetWindowList) {
+ WindowInfo info = CreateTestWindow(kWindowTitle);
+ DesktopCapturer::SourceList window_list;
+ ASSERT_TRUE(GetWindowList(GetWindowListFlags::kNone, &window_list));
+ EXPECT_GT(window_list.size(), 0ULL);
+ EXPECT_NE(std::find_if(window_list.begin(), window_list.end(),
+ [&info](DesktopCapturer::Source window) {
+ return reinterpret_cast<HWND>(window.id) ==
+ info.hwnd;
+ }),
+ window_list.end());
+ DestroyTestWindow(info);
+}
+
+// Disable thread-safety-analysis in order to test unresponsive Windows.
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wthread-safety-analysis"
+
std::unique_ptr<Thread> SetUpUnresponsiveWindow(std::mutex& mtx,
WindowInfo& info) {
std::unique_ptr<Thread> window_thread;
@@ -47,22 +65,6 @@ std::unique_ptr<Thread> SetUpUnresponsiveWindow(std::mutex& mtx,
return window_thread;
}
-} // namespace
-
-TEST(WindowCaptureUtilsTest, GetWindowList) {
- WindowInfo info = CreateTestWindow(kWindowTitle);
- DesktopCapturer::SourceList window_list;
- ASSERT_TRUE(GetWindowList(GetWindowListFlags::kNone, &window_list));
- EXPECT_GT(window_list.size(), 0ULL);
- EXPECT_NE(std::find_if(window_list.begin(), window_list.end(),
- [&info](DesktopCapturer::Source window) {
- return reinterpret_cast<HWND>(window.id) ==
- info.hwnd;
- }),
- window_list.end());
- DestroyTestWindow(info);
-}
-
TEST(WindowCaptureUtilsTest, IncludeUnresponsiveWindows) {
std::mutex mtx;
WindowInfo info;
@@ -107,6 +109,8 @@ TEST(WindowCaptureUtilsTest, IgnoreUnresponsiveWindows) {
window_thread->Stop();
}
+#pragma clang diagnostic pop
+
TEST(WindowCaptureUtilsTest, IncludeUntitledWindows) {
WindowInfo info = CreateTestWindow(L"");
DesktopCapturer::SourceList window_list;
@@ -148,4 +152,5 @@ TEST(WindowCaptureUtilsTest, IgnoreCurrentProcessWindows) {
DestroyTestWindow(info);
}
+} // namespace
} // namespace webrtc