electron/atom
Samuel Attard 77a4946069
refactor: rewire the desktop capturer API to remove race conditions (#18029)
We now create a new instance of atom::api::DesktopCapturer for every
request instead of weirdly re-using the same instance and queuing
requests.  This means there is now a 1:1 relationship between request
and DesktopCapturer so there isn't a race condition between the observer
for one request calling back before the observer of another.  This is an
issue ever since the backing APIs moved to worker threads.

This also does a few things to ensure memory management
* Only ever listen to one event per-request, after that we wipe the emit
function to ignore all future events
* Ensures we clean up the window_capturer_, screen_capturer_ and
captured_sources_ in native land once the request is over.

This _in theory_ fixes a flake we've been seeing on CI where we try to
resolve the promise for a request that no longerr exists.
2019-04-29 13:21:28 -07:00
..
app refactor: initialize feature list earlier (#17922) 2019-04-23 15:18:12 -07:00
browser refactor: rewire the desktop capturer API to remove race conditions (#18029) 2019-04-29 13:21:28 -07:00
common feat: migrate protocol module to NetworkService (Part 2) (#17965) 2019-04-29 11:37:45 +09:00
renderer feat: upgrade to Node 12 (#17838) 2019-04-26 18:55:12 +09:00
utility More migration of ServiceContext to ServiceBinding 2019-02-14 23:59:22 +05:30