In the registerFileProtocol docs the "headers" argument of the callback was described as being a list. In fact is has to be an Object mapping header-entries to values. This can be seen in Line 326 of `/spec/api-protocol-spec.js` [fe618631f1/spec/api-protocol-spec.js (L326)].
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.
* Pass protocol type and handler to factory
* Add converter for network::ResourceRequest
* Implement Buffer and String protocol handler
* Implement file protocol
* fix: add boringssl backport to support node upgrade
* fix: Update node_includes.h, add DCHECK macros
* fix: Update node Debug Options parser usage
* fix: Fix asar setup
* fix: using v8Util in isolated context
* fix: make "process" available in preload scripts
* fix: use proper options parser and remove setting of _breakFirstLine
_breakFirstLine was being set on the process, but that has changed in node 12 and so is no longer needed. Node will handle it properly when --inspect-brk is provided
* chore: update node dep sha
* fix: process.binding => _linkedBinding in sandboxed isolated preload
* fix: make original-fs work with streams
* build: override node module version
* fix: use _linkedBinding in content_script/init.js
* chore: update node ref in DEPS
* build: node_module_version should be 73
* build: optimize the happy path when syncing on CI
This adds a new cache for the "src" directory that is only ever used if
the cache key matches exactly. If there is no exact match we fall back
to the old strategy of using the git cache.
On the happy path this can make the checkout on linux/macOS take around
5-6 minutes which is **significantly** faster than the original 15-18
minutes.
* build: sort readdir result to ensure stability
* build: increment cache key
* Update config.yml
* build: ensure that the cleanly checked out Electron has had hooks run on it
* build: do not remove deps/v8
* build: ensure clean git directory when generating deps hash
* chore: add comments to caching logic
* Update .circleci/config.yml
Co-Authored-By: MarshallOfSound <samuel.r.attard@gmail.com>