Skip to content

refactor: move electron::api::GlobalShortcut to cppgc - #52974

Merged
MarshallOfSound merged 1 commit into
42-x-yfrom
manual-bp/42-x-y/50192
Aug 19, 2026
Merged

MarshallOfSound merged 1 commit into
42-x-yfrom
manual-bp/42-x-y/50192

Conversation

@VerteDinde

Copy link
Copy Markdown
Member

Backport of #50192

See that PR for details.

Manual backport notes: formatting-only conflict in typings/internal-ambient.d.ts (42-x-y has the prettier-formatted typings); C++ hunks identical to main. Supersedes #51754.

Notes: none.

* refactor: migrate electron::api::GlobalShortcut to cppgc

* refactor: lazy-create electron::api::GlobalShortcut

copy the lazy-create idom used by electron::api::Screen

* refactor: use gin::WeakCellFactory in GlobalCallbacks

* fix: make a copy of `callback` before running it

safeguard against the callback changing the map, invalidating `cb`

* chore: reduce unnecessary diffs with main

* fixup! refactor: use gin::WeakCellFactory in GlobalCallbacks

fix: must Trace() the weak cell factory

* fix: destruction order

- Setup isolate dispose observer to run destruction sequences
and remove self persistent reference
- Skip NOTREACHED check during destruction, it can happen
as a result of plaform listeners scheduling callbacks when Unregister is invoked.
- Fix the order of unregistration in GlobalShortcut::Unregister
- Add GlobalShortcut::UnregisterAllInternal to avoid any callsites
that can re-enter V8

* fix: crash during gc from incorrect cppgc object headers

* chore: update patches

* chore: cleanup

* chore: fix lint

---------

Co-authored-by: deepak1556 <[email protected]>
(cherry picked from commit 53bf94f)
@VerteDinde VerteDinde added backport This is a backport PR semver/patch backwards-compatible bug fixes 42-x-y labels Aug 18, 2026
@MarshallOfSound
MarshallOfSound enabled auto-merge (squash) August 19, 2026 07:21
@MarshallOfSound
MarshallOfSound merged commit 7c573a3 into 42-x-y Aug 19, 2026
157 of 160 checks passed
@MarshallOfSound
MarshallOfSound deleted the manual-bp/42-x-y/50192 branch August 19, 2026 07:21
@release-clerk

release-clerk Bot commented Aug 19, 2026

Copy link
Copy Markdown

No Release Notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

42-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants