 -    CFRelease(it->second.stream);
 -    display_stream_wrappers_.erase(it);
 +  DisplayStreamManager() : rw_lock_(RWLockWrapper::CreateRWLock()) {}
-+  void ReaderLock() { rw_lock_->AcquireLockShared(); }
-+  void ReaderUnlock() { rw_lock_->ReleaseLockShared(); }
++  RWLockWrapper* GetLock() {return rw_lock_.get();};
  
 -    if (ready_for_self_destruction_ && display_stream_wrappers_.empty())
 +  int GetUniqueId() {

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

 
 namespace webrtc {
 
@@ -48,20 +49,32 @@ namespace {
 // destroy itself once it's done.
 class DisplayStreamManager {
  public:
