From 39d93da776c2ff5ce3bc78eaa8f81b6eb42d7a2a Mon Sep 17 00:00:00 2001 From: Tommi Date: Wed, 17 Jan 2018 12:31:13 +0100 Subject: [PATCH] Add ScopedAllowBaseSyncPrimitives to WebRTC for compatibility with Chromium. This will be overridden in Chromium in a future CL and following that, used inside of WebRTC as needed while issues with blocking events are being fixed. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: chromium:796889, chromium:795340 Change-Id: I098a03d9bad621f1349ef483b82e4d8e786a8a75 Reviewed-on: https://webrtc-review.googlesource.com/40140 Reviewed-by: Kári Helgason Commit-Queue: Tommi Cr-Commit-Position: refs/heads/master@{#21659} --- rtc_base/event.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rtc_base/event.h b/rtc_base/event.h index ce2666fb3f..7e61c4c8a6 100644 --- a/rtc_base/event.h +++ b/rtc_base/event.h @@ -49,6 +49,20 @@ class Event { RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(Event); }; +// This class is provided for compatibility with Chromium. +// The rtc::Event implementation is overriden inside of Chromium for the +// purposes of detecting when threads are blocked that shouldn't be as well as +// to use the more accurate event implementation that's there than is provided +// by default on some platforms (e.g. Windows). +// When building with standalone WebRTC, this class is a noop. +// For further information, please see the ScopedAllowBaseSyncPrimitives class +// in Chromium. +class ScopedAllowBaseSyncPrimitives { + public: + ScopedAllowBaseSyncPrimitives() {} + ~ScopedAllowBaseSyncPrimitives() {} +}; + } // namespace rtc #endif // RTC_BASE_EVENT_H_