gecko-dev/media/webrtc
Dan Minor 6e3ccd3e2a Bug 1368030 - Fix race condition in ScreenCapturerMac. r=jesup
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.
2017-07-19 14:49:05 -04:00
..
signaling Merge m-c to inbound, a=merge 2017-07-21 18:20:46 -07:00
trunk Bug 1368030 - Fix race condition in ScreenCapturerMac. r=jesup 2017-07-19 14:49:05 -04:00
.gclient
.gclient_entries
moz.build Bug 1378523 - Enable -fsanitize=trace-pc-guard for WebRTC in fuzzing. r=drno 2017-07-05 23:43:24 +02:00
webrtc_update.sh
webrtc_version.h