      for (auto& pair : display_stream_wrappers_) {
        DisplayStreamWrapper& wrapper = pair.second;
        if (wrapper.active) {
-@@ -105,15 +120,23 @@ void UnregisterActiveStreams() {
+@@ -83,15 +97,23 @@ class DisplayStreamManager {
    }
  
    void PrepareForSelfDestruction() {

   // Once the DisplayStreamManager is ready for destruction, the
   // ScreenCapturerMac is no longer present. Any updates should be ignored.
-  bool ShouldIgnoreUpdates() { return ready_for_self_destruction_; }
+  // Note: not thread-safe! Call ReaderLock() and ReaderUnlock() manually.
+  bool ShouldIgnoreUpdates() {
+     return ready_for_self_destruction_;
+  }
 
  private:
   struct DisplayStreamWrapper {
@@ -128,6 +151,7 @@ class DisplayStreamManager {
   std::map<int, DisplayStreamWrapper> display_stream_wrappers_;
   int unique_id_generator_ = 0;
   bool ready_for_self_destruction_ = false;
+  std::unique_ptr<RWLockWrapper> rw_lock_;
 };

 // Standard Mac displays have 72dpi, but we report 96dpi for
@@ -950,9 +974,6 @@ void ScreenRefresh(CGRectCount count,
             return;
           }
 

diff --git a/modules/desktop_capture/screen_capturer_mac.mm b/modules/desktop_capture/screen_capturer_mac.mm
index 6f2690f28..7d297f56e 100644
--- a/modules/desktop_capture/screen_capturer_mac.mm
+++ b/modules/desktop_capture/screen_capturer_mac.mm
@@ -36,6 +36,7 @@
