* fix: do not run microtasks in V8Serializer in browser process
* Remove no-op MicrotasksScope in `shell/browser/api/electron_api_auto_updater.cc`
This call was added in https://github.com/electron/electron/pull/40576 as an expansion of `gin_helper::EmitEvent`.
Since this only runs in the browser process and `bool ignore_browser_checkpoint = true` this code is a no-op.
Node should perform a microtask checkpoint if necessary in `node::MakeCallback`.
* Remove no-op MicrotasksScope in `shell/common/api/electron_bindings.cc`
This method is only called by the browser process. The containing function, `ElectronBindings::DidReceiveMemoryDump`, is only used in two places:
* `ElectronBindings::GetProcessMemoryInfo` in the same file, which has a `CHECK` that it's running in the browser process at the top.
* From `shell/browser/api/electron_api_web_contents.cc`, which is only run in the browser process.
Added a DCHECK for clarity and validation.
* Replace `gin_helper::MicrotasksScope` with `v8::MicrotasksScope` in `shell/renderer/`
The browser check is unnecessary in the renderer. Since `gin_helper::MicrotasksScope` will always act exactly like `v8::MicrotasksScope`, it's clear to just use the v8 object directly. This also brings them in line with the many other uses of `v8::MicrotasksScope` in `shell/renderer/`.
refactor: remove electron::WebContentsPermissionHelper::PermissionTypes::KEYBOARD_LOCK
This was added in 344aba0. In the time when this PR initially went up and
when 344aba0 landed, upstream added blink::PermissionTypes::KEYBOARD_LOCK.
Our duplicate copy can be removed.
feat: expose shouldUseDarkColorsForSystemIntegratedUI
Closes https://github.com/electron/electron/issues/46429.
Refs https://github.com/electron/electron/pull/19735.
This PR adds a new API `shouldUseDarkColorsForSystemIntegratedUI` to the
`nativeTheme` module. This API returns a boolean indicating whether the
system is using dark colors for system integrated UI elements. This is
useful for applications that want to adapt their UI to match the system
theme, especially for those that use system integrated UI elements like
the shell theme or taskbar appearance.
* refactor: make api::View::GetBounds() const
* refactor: make api::View::OnViewBoundsChanged() private
refactor: make api::View::OnViewIsDeleting() private
refactor: make api::View::OnChildViewRemoved() private
* refactor: make ChildPair private
* refactor: use AddChildView(std::unique_ptr<View>) in OpaqueFrameView::CreateButton()
Xref: https://issues.chromium.org/issues/40485510
* refactor: use AddChildView(std::unique_ptr<View>) in MenuBar::RebuildChildren()
* refactor: use AddChildView(std::unique_ptr<View>) for ClientFrameViewLinux labels
* refactor: use AddChildView(std::unique_ptr<View>) for ClientFrameViewLinux buttons
* refactor: use AddChildView(std::unique_ptr<View>) in AutofillPopupView
* refactor: use AddChildViewRaw() to flag the edge cases that we still need to fix
* chore: use west coast const for consistency
* perf: do not clone the map each time we call Archive::HeaderIntegrity()
* perf: use absl::flat_hash_map for the integrity cache
* perf: do not clone the JSON payload string
* perf: preallocate capacity for the integrity cache
* perf: use move variant of insert_or_assign()
* refactor: simplify integrity cache building
remove unnecessary std::optional<>
* refactor: use base::FindOrNull()
* refactor: remove unused #includes
* refactor: make variable types explicit
* fix: make res_size unsigned
* refactor: put GetIntegrityConfigCache() in an unnamed namespace
refator: put LoadIntegrityConfig() in an unnamed namespace
* fix: oops, missing rel_path_utf8 key
* fix: oops, fix Wunreachable-code-return
* refactor: instantiate navigation_entries on the stack instead of the heap
* refactor: reserve the full size of navigation_entries
* refactor: use emplace_back to simplify the code a little
* fix: destroy parent port backend when JS env exits
* fix: close parent port before destroying
---------
Co-authored-by: deepak1556 <hop2deep@gmail.com>
* chore: bump chromium in DEPS to 136.0.7076.0
* chore: bump chromium in DEPS to 136.0.7077.0
* 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | 6368856
* 6356528: Clean up LegacyRenderWidgetHostHWND code | 6356528
* chore: export patches
* 6339113: [Viewport Segments] Add CDP commands to override Viewport Segments without overriding other device properties. | 6339113
* 6352169: [DevTools][MultiInstance] Support new tab in another window on Android | 6352169
* 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | 6368856
* 6360858:Clickiness: Wire response from URLLoader to DB, add e2e tests| 6360858
* chore: bump chromium in DEPS to 136.0.7079.0
* chore: export patches
* chore: bump chromium in DEPS to 136.0.7081.0
* chore: export patches
* chore: bump chromium in DEPS to 136.0.7083.0
* 6361987: Remove double-declaration with gfx::NativeView and gfx::NativeWindow | 6361987
* chore: export patches
* chore: bump chromium in DEPS to 136.0.7087.0
* chore: export patches
* fix: include node patch for missing AtomicsWaitEvent
6385540
* build: add depot_tools python to path
* fix: cppgc init and unregistering v8 isolate
6333562
CppGc is now initialized earlier so Node can skip reinitializing it.
Additionally, gin::IsolateHandle was attempting to destruct an already destructed
v8::Isolate upon electron::JavaScriptEnvironment destruction. By removing the call
to NodePlatform::UnregisterIsolate, this fixes the crash on app shutdown.
* fix: unregister isolate after destruction
See code comment.
* chore: bump chromium in DEPS to 136.0.7095.0
* chore: sync patches
* fix: add script_parsing::ContentScriptType parameter
6298395
* fix: migrate content::BrowserAccessibilityState methods
64014376383275
* feat: enableHappyEyeballs option for host resolver
6332599
* fix: add new cookie exclusion reason
6343479
* fix: add new url loader method
6337340
* fix: add new cppgc header file for electron_node headers
6348644
* fix: disable CREL on Linux ARM64
https://chromium-review.googlesource.com/q/I3a62f02f564f07be63173b0773b4ecaffbe939b9
* fixup! fix: add new cppgc header file for electron_node headers 6348644
* chore: update corner smoothing patch
* fixup! chore: update corner smoothing patch
* chore: disable NAN weak tests
These two tests are incompatible with a V8 change that disallows running JS code from a weak finalizer callback.
Ref: 4733273
* test: fix task starvation in node test
A V8 change makes these contexts get collected in a task that is posted
and run asynchronously. The tests were synchronously GC'ing in an
infinite loop, preventing the task loop from running the task that would
GC these contexts.
This change should be upstreamed in some way.
Ref: 4733273
---------
Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: alice <alice@makenotion.com>
Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: clavin <clavin@electronjs.org>
New Node.js module resolution system reads `package.json` from imported
modules by reading from the file natively in C++ without calling into
`fs.readFileSync`. The ASAR FS wrapper code had copied files out into a
temporary folder as a workaround, but it is inefficient and does not
cover all module resolution mechanisms in Node.js.
In this change we expose `overrideReadFileSync` method on the `modules`
binding in Node.js, and use this override to call into ASAR-supporting
`fs.readFileSync`.
* fix: gin_helper::Promise in GPUInfoManager must be destroyed before destroying Node/V8
* fix: use CleanedUpAtExit to control the lifetime of GPUInfoManager
* fix: ensure maximize is emitted when reduce motion is enabled on macOS
* Revert "build: reenable graphics effects for macOS tests (#46454)"
This reverts commit 682ea345ac.