From 70294c8eab2f7bcc4678c3b597beda5ee504b47c Mon Sep 17 00:00:00 2001 From: Henrik Grunell Date: Wed, 31 Jan 2018 08:32:01 +0000 Subject: [PATCH] Revert "Add ScopedAllowBaseSyncPrimitives for DesktopConfigurationMonitor." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0a3593c25dbc96b7d66d17ab77fc9984ab2bf245. Reason for revert: breaks WebRTC roll to Chromium. https://chromium-review.googlesource.com/c/chromium/src/+/894164 [19742:771:0130/150628.286256:FATAL:thread_restrictions.cc(67)] Check failed: !g_blocking_disallowed.Get().Get(). To allow //base sync primitives in a scope where blocking is disallowed use ScopedAllowBaseSyncPrimitivesOutsideBlockingScope. 0 browser_tests 0x0000000108d3682c base::debug::StackTrace::StackTrace(unsigned long) + 28 1 browser_tests 0x0000000108d5b210 logging::LogMessage::~LogMessage() + 224 2 browser_tests 0x0000000108e04366 base::ScopedAllowBaseSyncPrimitives::ScopedAllowBaseSyncPrimitives() + 150 3 browser_tests 0x000000010be59c48 webrtc::DesktopConfigurationMonitor::Lock() + 24 4 browser_tests 0x0000000106dbf229 webrtc::DesktopCapturer::CreateRawScreenCapturer(webrtc::DesktopCaptureOptions const&) + 313 5 browser_tests 0x000000010be58725 webrtc::DesktopCapturer::CreateScreenCapturer(webrtc::DesktopCaptureOptions const&) + 21 6 browser_tests 0x00000001074dc209 content::DesktopCaptureDevice::Create(content::DesktopMediaID const&) + 169 (...) Original change's description: > Add ScopedAllowBaseSyncPrimitives for DesktopConfigurationMonitor. > This is a temporary measure until the synchronization method > used in the class, gets fixed. > > Bug: chromium:796889, chromium:795340 > Change-Id: Ie3d394ae42f005e8e0f353d04ea9c1d053ea9fd2 > Reviewed-on: https://webrtc-review.googlesource.com/40460 > Reviewed-by: Erik Språng > Commit-Queue: Tommi > Cr-Commit-Position: refs/heads/master@{#21812} TBR=tommi@webrtc.org,sprang@webrtc.org Change-Id: I6237c3df7e33918d9fe2e46bad0f6f96cda77cd1 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:796889, chromium:795340 Reviewed-on: https://webrtc-review.googlesource.com/46540 Reviewed-by: Henrik Grunell Commit-Queue: Henrik Grunell Cr-Commit-Position: refs/heads/master@{#21817} --- .../desktop_capture/mac/desktop_configuration_monitor.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/modules/desktop_capture/mac/desktop_configuration_monitor.cc b/modules/desktop_capture/mac/desktop_configuration_monitor.cc index 922f3ec59c..4eeee32106 100644 --- a/modules/desktop_capture/mac/desktop_configuration_monitor.cc +++ b/modules/desktop_capture/mac/desktop_configuration_monitor.cc @@ -11,7 +11,6 @@ #include "modules/desktop_capture/mac/desktop_configuration_monitor.h" #include "modules/desktop_capture/mac/desktop_configuration.h" -#include "rtc_base/event.h" #include "rtc_base/logging.h" #include "system_wrappers/include/event_wrapper.h" @@ -42,9 +41,6 @@ DesktopConfigurationMonitor::~DesktopConfigurationMonitor() { } void DesktopConfigurationMonitor::Lock() { - // TODO(crbug.com/796889, crbug.com/795340): Fix how synchronization is being - // done and avoid blocking waits. - rtc::ScopedAllowBaseSyncPrimitives allow_event_wait; if (!display_configuration_capture_event_->Wait( kDisplayConfigurationEventTimeoutMs)) { RTC_LOG_F(LS_ERROR) << "Event wait timed out."; @@ -74,10 +70,6 @@ void DesktopConfigurationMonitor::DisplaysReconfigured( // If this is the first display to start reconfiguring then wait on // |display_configuration_capture_event_| to block the capture thread // from accessing display memory until the reconfiguration completes. - - // TODO(crbug.com/796889, crbug.com/795340): Fix how synchronization is - // being done and avoid blocking waits. - rtc::ScopedAllowBaseSyncPrimitives allow_event_wait; if (!display_configuration_capture_event_->Wait( kDisplayConfigurationEventTimeoutMs)) { RTC_LOG_F(LS_ERROR) << "Event wait timed out.";