electron/lib/browser
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
..
api refactor: natively promisify WebContents.prototype.takeHeapSnapshot (#18000) 2019-04-29 10:11:11 -07:00
chrome-devtools.js refactor: use fs.promises API, which is stable since Node 12 (#17999) 2019-04-29 11:18:03 -07:00
chrome-extension.js refactor: use fs.promises API, which is stable since Node 12 (#17999) 2019-04-29 11:18:03 -07:00
crash-reporter-init.js chore: remove unused catch bindings (#16121) 2019-02-21 09:26:07 +00:00
default-menu.ts chore: rename atomBinding to electronBinding (#17419) 2019-03-18 12:37:06 -07:00
desktop-capturer.js refactor: rewire the desktop capturer API to remove race conditions (#18029) 2019-04-29 13:21:28 -07:00
guest-view-manager.js feat: add <webview>.getWebContentsId() (#17407) 2019-03-26 10:57:27 +09:00
guest-window-manager.js chore: rename atomBinding to electronBinding (#17419) 2019-03-18 12:37:06 -07:00
init.ts fix: handle remote-debugging-port=0 correctly (#17800) 2019-04-16 14:22:51 -04:00
ipc-main-internal-utils.ts refactor: use ipcMainUtils.invokeInWebContents / ipcRendererUtils.handle helpers for Chrome APIs (#17417) 2019-03-26 11:38:35 +09:00
ipc-main-internal.ts refactor: Split 'Event' docs/types into more specific Event types (#17038) 2019-02-19 09:24:19 +00:00
navigation-controller.js chore: dont log 100000000 chars of URL (#16800) 2019-02-07 08:50:47 -08:00
objects-registry.js fix: maintain a ref count for objects sent over remote (#17464) 2019-04-16 16:08:11 -04:00
rpc-server.js refactor: use fs.promises API, which is stable since Node 12 (#17999) 2019-04-29 11:18:03 -07:00