-
Notifications
You must be signed in to change notification settings - Fork 15.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: segfault when moving WebContentsView between BrowserWindows #44599
Conversation
Release Notes Persisted
|
I have automatically backported this PR to "34-x-y", please check out #44612 |
I have automatically backported this PR to "33-x-y", please check out #44613 |
I have automatically backported this PR to "31-x-y", please check out #44614 |
I have automatically backported this PR to "32-x-y", please check out #44615 |
Description of Change
The root of this issue is that View was not properly accounting for children that had been removed by being moved over to another View. This PR fixes that issue by using
OnChildViewRemoved
fromviews::ViewObserver
to handle this use case.This PR also adds a test case to verify this fix.
Here is a run with that test case before the fix has been applied:
https://github.com/electron/electron/actions/runs/11748536232/job/32734670103?pr=44599
Checklist
npm test
passesRelease Notes
Notes: Fixed segfault when moving WebContentsView between BrowserWindows.