зеркало из https://github.com/mozilla/gecko-dev.git
6e3ccd3e2a
The race condition is between ~ScreenCapturerMac and the ScreenRefresh and ScreenUpdateMove callbacks. The destructor calls UnregisterRefreshAndMoveHandlers but a callback may still occur after the destruction of the object. Rather than passing a pointer to ScreenCapturerMac into the callback, this adds a separate object which keeps a pointer to ScreenCapturerMac guarded by a CriticalSection. The destructor sets the ScreenCapturerMac to nullptr. In the next callback, the handler unregisters the callbacks and deletes the object. The downside to this approach is that if the ScreenCapturerMac object is allocated and deallocated before a callback occurs, the memory for the separate object will be leaked. |
||
---|---|---|
.. | ||
signaling | ||
trunk | ||
.gclient | ||
.gclient_entries | ||
moz.build | ||
webrtc_update.sh | ||
webrtc_version.h |