77a4946069
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. |
||
---|---|---|
.. | ||
browser | ||
common | ||
content_script | ||
isolated_renderer | ||
renderer | ||
sandboxed_renderer | ||
worker |