* chore: bump chromium in DEPS to 92.0.4500.2
* resolve conflicts
* update patches
* chore: cherry-pick 82434206f306 from chromium (#29060)
* fix patch
* chore: bump chromium in DEPS to 92.0.4501.0
* chore: bump chromium in DEPS to 92.0.4502.0
* chore: bump chromium in DEPS to 92.0.4503.0
* chore: update patches
* 2869869: [Code Health] Refactor ListValue::Insert in gpu compositor
https://chromium-review.googlesource.com/c/chromium/src/+/2869869
* 2877924: Separate InkDropHost from InkDropHostView
https://chromium-review.googlesource.com/c/chromium/src/+/2877924
* chore: bump chromium in DEPS to 92.0.4504.0
* update patches
* Fixup for Separate InkDropHost from InkDropHostView
https://chromium-review.googlesource.com/c/chromium/src/+/2877924
* 2873469: Compute hashes of .pak files during the build, and check it at runtime.
https://chromium-review.googlesource.com/c/chromium/src/+/2873469
* 2874397: Remove flag to disable microtasks scope consistency checks
https://chromium-review.googlesource.com/c/v8/v8/+/2874397
* 2881471: Remove unneeded trace_event.h includes in headers.
https://chromium-review.googlesource.com/c/chromium/src/+/2881471
* 2844717: [Keyboard Tooltip] Rename RWHV*::SetTooltipText to UpdateTooltipUnderCursor
https://chromium-review.googlesource.com/c/chromium/src/+/2844717
* chore: bump chromium in DEPS to 92.0.4505.0
* chore: update patches
* 2883887: Retire ScopedObserver in /chrome/browser/predictors.
https://chromium-review.googlesource.com/c/chromium/src/+/2883887
* 2883694: Retire ScopedObserver in /chrome/browser.
https://chromium-review.googlesource.com/c/chromium/src/+/2883694
* fixup after merge
* fixup: Remove flag to disable microtasks scope consistency checks
* Temporarily disable setcallhandler-test.js nan test
This test should be renabled once https://github.com/electron/electron/pull/29028 lands
* Use gin_helper::MicrotasksScope instead of v8::MicrotasksScope
* chore: bump chromium in DEPS to 92.0.4506.0
* update patches
* Revert "update patches"
This reverts commit 333ec0d4c205bd3cbee28d2bc3d068871dbb900a.
* Revert "chore: bump chromium in DEPS to 92.0.4506.0"
This reverts commit 2bd52f8cd89b173c8b15a61d74fa7539cdbf574b.
* Fixup: Use gin_helper::MicrotasksScope instead of v8::MicrotasksScope
* Fixup: Use gin_helper::MicrotasksScope instead of v8::MicrotasksScope
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
* fix: allow Node.js to manage microtasks queue
When `uv_run()` resulted in invocation of JS functions the microtask
queue checkpoint in Node's CallbackScope was a no-op because the
expected microtask queue policy was `kExplicit` and Electron ran under
`kScoped` policy. This change switches policy to `kExplicit` right
before `uv_run()` and reverts it back to original value after `uv_run()`
completes to provide better compatibility with Node.
* add comment
* refactor: add a wrapper for wrangling uv handles.
Part 1 of a fix for #25248, #22069.
Place the uv_asyncs owned by NodeBindings, ElectronBindings inside a new
UvHandle wrapper class which manages uv_handles' need for their closed()
callback to be invoked before the handles' memory can be freed.
* chore: make lint happy
* refactor: use DCHECK_EQ() instead of DCHECK()
* refactor: fix oops
* fix: use Node.js isolate setup logic in bindings
* Flags should be more process-specific
* Remove redundant isolate function setting
* Remove old SetFatalErrorHandler call
* fix: let Node.js perform microtask checkpoint in the main process
* fix: don't specify v8::MicrotasksScope for explicit policy
* fix: remove checkpoint from some call-sites
We already perform checkpoint at the end of a task,
either through MicrotaskRunner or through NodeBindings.
There isn't a need to add them again when calling into JS
except when dealing with promises.
* fix: remove checkpoint from some call-sites
We already perform checkpoint at the end of a task,
either through MicrotaskRunner or through NodeBindings.
There isn't a need to add them again when calling into JS
except when dealing with promises.
* fix incorrect specs
* default constructor arguments are considered for explicit mark
* add regression spec
* chore: remove unused views API classes
* chore: remove LayoutManager code
* chore: no more need to make View inherit from TrackabeObject
* chore: make enable_view_api default to true
* chore: enable_view_api => enable_views_api
* feat: add a new contextBridge module
* chore: fix docs linting
* feat: add support for function arguments being proxied
* chore: ensure that contextBridge can only be used when contextIsolation is enabled
* docs: getReverseBinding can be null
* docs: fix broken links in md file
* feat: add support for promises in function parameters
* fix: linting failure for explicit constructor
* Update atom_api_context_bridge.cc
* chore: update docs and API design as per feedback
* refactor: remove reverse bindings and handle GC'able functions across the bridge
* chore: only expose debugGC in testing builds
* fix: do not proxy promises as objects
* spec: add complete spec coverage for contextBridge
* spec: add tests for null/undefined and the anti-overwrite logic
* chore: fix linting
* spec: add complex nested back-and-forth function calling
* fix: expose contextBridge in sandboxed renderers
* refactor: improve security of default_app using the new contextBridge module
* s/bindAPIInMainWorld/exposeInMainWorld
* chore: sorry for this commit, its a big one, I fixed like everything and refactored a lot
* chore: remove PassedValueCache as it is unused now
Values transferred from context A to context B are now cachde in the RenderFramePersistenceStore
* chore: move to anonymous namespace
* refactor: remove PassValueToOtherContextWithCache
* chore: remove commented unused code blocks
* chore: remove .only
* chore: remote commented code
* refactor: extract RenderFramePersistenceStore
* spec: ensure it works with numbered keys
* fix: handle number keys correctly
* fix: sort out the linter
* spec: update default_app asar spec for removed file
* refactor: change signatures to return v8 objects directly rather than the mate dictionary handle
* refactor: use the v8 serializer to support cloneable buffers and other object types
* chore: fix linting
* fix: handle hash collisions with a linked list in the map
* fix: enforce a recursion limit on the context bridge
* chore: fix linting
* chore: remove TODO
* chore: adapt for PR feedback
* chore: remove .only
* chore: clean up docs and clean up the proxy map when objects are released
* chore: ensure we cache object values that are cloned through the V8 serializer
* use gin converter in atom_api_menu
* please only put necessary includes in header
Having include in header means they have dependency relationship,
putting arbitrary includes really really really really really makes
refacoring much harder.
* remove some simple uses of callback_converter_deprecated.h
* use gin callback converter in file_dialog code
* use gin in ErrorThrower
* use gin in atom_bundle_mover
* fix mistake in node stream
* deprecate native_mate version of event_emitter_caller
* use gin in node_bindings
* remove usages of native_mate event_emitter_caller.h except for EventEmitter
* fix compilation on Windows
* gin::Arguments behaves differently on GetNext
* just use StringToV8
* feat: add new nativeTheme API
* chore: deprecate and clean up old systemPreferences theme APIs in favor of new nativeTheme module
* chore: clean up and deprecate things per feedback
* chore: add tests for deprecate and clean up invert impl
* build: when is a boolean not a boolean???
* chore: update to node 12.4.0
* chore: fix js2c compilation and usage
* update branch reference
* chore: roll node
* refactor: use the new node::options_parser::Parse method
* fix: make node create our context for us so that everything is initialized correctly
* fix: let node do it's thing to the all contexts
We need to let node know about all the contexts that Chromium creates for the renderer processes so that it does not crash when trying to access primordials. Similar to node::NewContext but with an existing context
* chore: roll node
* chore: roll node
* chore: roll node
* chore: roll node
* fix: ensure that _noBrowserGlobals is set before the node bootstrapper runs
Co-authored-by: Jeremy Apthorp <jeremya@chromium.org>
* fix: use gn/clang-format from src
* fix: download clang-format in lint job
* chore: fix linting warning
* chore: get_path_in_buildtools => get_buildtools_executable
* chore: the clang-format npm package is not used