* refactor: desttroy URLRequestContextGetter on IO thread
* Accepts a factory class that can customize the creation of URLRequestContext
* Use a separate request context for media which is derived from the default
* Notify URLRequestContextGetter observers and cleanup on IO thread
* Move most of brightray net/ classes into atom net/
* refactor: remove refs to URLRequestContextGetter on shutdown
* refactor: remove brigtray switches.{cc|h}
* refactor: remove brightray network_delegate.{cc|h}
* refactor: make AtomURLRequestJobFactory the top level factory.
* Allows to use the default handler from content/ for http{s}, ws{s} schemes.
* Removes the storage of job factory in URLRequestContextGetter.
* Add process creation time
* Making docs clear for process creation time
* Address comments for process creation time
* Add process info cc file
* fixing comments around documentation
* Update doc for return val
* Capitalize number in docs
* chore: bump electron-typescript-definitions
* add new native_mate converters for base::Value
* fix converter swapping
* remove createDeepCopy from browser/api
* replace missing ListValue converter
* convert bulk of remaining createDeepCopy instances
* convert last remaining instances of createDeepCopy
* incremental progress and helper methods for value conversion
* convert Get and add template function for GetString
* final DictionaryValue method conversions
* remove usage of base::DictionaryValue in web_contents_preferences
* use IsEnabled helper where possible
* Update atom_api_web_view_manager.cc
After after using `processId-contextCounter` as contextId, it may happen
that contexts in different WebContents sharing the same renderer process
get the same contextId. Using webContentsId as part of key in
ObjectsRegistry can fix this.
After the page does navigations, garbage collection can still happen in
the old context. This commit changes to store references to remote objects
by _pages_, instead of by _WebContents_.
* Add promise helper and change whenReady to be native impl
* remove commented code
* add GetInner helper to dedupe promise code
* add Promise.reject helper to be consistent with JS
* fix linting
* update promise impl per feedback
* remove param name from unused isolate
* Use non-depreceated resolvers for promises
* Add thread dchecks for promise helper, intiialize promise pointer to nullptr
* Introduce `net.{start|stop}Logging()`
- Slight regression right now as Electron won't automatically start logging net-logs at launch, will soon be fixed
- To implement callback for async controls
* Add `net.isLogging` & optional callback param for `net.stopLogging()`
* Fix small regression on --log-net-log
--log-net-log should work again
* Error on empty file path
* Only start with valid file path
* Remove unused var
* Allow setting log file path before URLRequestContextGetter starts logging
* Add net log tests
* Remove redundant checks
* Use brightray::NetLog
* Clean up code
* Should automatically stop listening
* 🎨 Attempt to fix styles
* Only run non-null callback
* Dump file to tmpdir
* Simplify net log spec
Spawned Electron process on Linux CI can fail to launch
* Separate netLog module
* Remove net logging test from net spec
* Add tests for netLog
* Fix header guard
* Clean up code
* Add netLog.currentlyLoggingPath
* Callback with filepath
* Add test for case when only .stopLogging() is called
* Add docs
* Reintroduce error on invalid arg
* Update copyright
* Update error message
* Juggle file path string types
* Make it possible to disable a module for a renderer
* Put DesktopCapturer API under a build flag
The name is "enable_desktop_capturer".
Enabled by default.
* Don't use JSON to send the result of `ipcRenderer.sendSync`.
- Change the return type of AtomViewHostMsg_Message_Sync from `base::string16`
to `base::ListValue`
- Adjust lib/browser/api/web-contents.js and /lib/renderer/api/ipc-renderer.js
to wrap/unwrap return values to/from array, instead of
serializing/deserializing JSON.
This change can greatly improve `ipcRenderer.sendSync` calls where the return
value contains Buffer instances, because those are converted to Array before
being serialized to JSON(which has no efficient way of representing byte
arrays).
A simple benchmark where remote.require('fs') was used to read a 16mb file got
at least 5x faster, not to mention it used a lot less memory. This difference
tends increases with larger buffers.
* Don't base64 encode Buffers
* Don't allocate V8ValueConverter on the heap
* Replace hidden global.sandbox with NodeBindings::IsInitialized()
* Refactoring: check NodeBindings::IsInitialized() in V8ValueConverter
* Refactor problematic test to make it more reliable
* Add tests for NaN and Infinity
* Add features.isOffscreenRenderingEnabled()
* Use .isOffscreenRenderingEnabled() to determine if OSR is available
* Add a helper closeTheWindow() function
* Skip OSR tests if they are disabled