Repository navigation
refactor: use gin::Wrappable for electron::api::Screen - #49506
Merged
Merged
Conversation
2 tasks done
gin::Wrappable for electron::api::Screengin::Wrappable for electron::api::Screen
deepak1556
approved these changes
Jan 23, 2026
ckerr
force-pushed
the
refactor/gin-wrappable-api-screen
branch
from
January 24, 2026 03:48
a6d505a to
bf8e646
Compare
dsanders11
approved these changes
Jan 24, 2026
This comment was marked as off-topic.
This comment was marked as off-topic.
|
No Release Notes |
deepak1556
reviewed
Jan 26, 2026
Comment on lines
+80
to
+83
| // Use `display::Screen::Get()` here, not our cached `screen_`: | ||
| // during shutdown, it can get torn down before us. | ||
| if (auto* screen = display::Screen::Get()) | ||
| screen->RemoveObserver(this); |
Member
There was a problem hiding this comment.
@ckerr I missed this new iteration change, if the api class is outliving the cached screen then we also need a similar check in
to protect against use-after-free.
2 of 3 tasks
jkleinsc
pushed a commit
that referenced
this pull request
Jan 27, 2026
fixes a regression from #49506
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
Part of #47922.
This PR migrates
electron::api::Screento inherit fromgin::Wrappableinstead of fromgin_helper::DeprecatedWrappable.Checklist
npm testpassesRelease Notes
Notes: none.