electron/shell
Calvin f15fa56e38
refactor: reduce & remove no-op MicrotasksScope calls (#46681)
* 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/`.
2025-04-19 12:18:03 -05:00
..
app chore: bump chromium to 136.0.7095.0 (main) (#46118) 2025-04-03 19:02:49 -05:00
browser refactor: reduce & remove no-op MicrotasksScope calls (#46681) 2025-04-19 12:18:03 -05:00
common refactor: reduce & remove no-op MicrotasksScope calls (#46681) 2025-04-19 12:18:03 -05:00
renderer refactor: reduce & remove no-op MicrotasksScope calls (#46681) 2025-04-19 12:18:03 -05:00
services/node fix: destroy parent port backend when JS env exits (#46437) 2025-04-04 11:02:54 -05:00
utility fix: broken OOP window.print() on macOS/Linux (#45214) 2025-01-20 10:23:44 +01:00