-
Notifications
You must be signed in to change notification settings - Fork 15k
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: don't destroy BrowserView webContents on owner window close #42136
Conversation
Looks like this affects:
seems like this answers my question for impetus of the original change - will investigate alternatives 🤔 |
@codebytere Felix and I took a look at this on Friday and came up with the approach of moving the webContents forEach loop from the browserWindow What do you think abt this approach? |
@codebytere Thank you! For what it's worth, a lot of the behavior here is undocumented anyway (see also #28382 😉) so I think we kind of get to solve the problem however we feel like it |
@yangannyx i like that approach! let's go with that - I'll close this out. Let me know when you'd like some review on. PR and i'll take a look 😁 |
@yangannyx is this still something you're planning to pursue? Given it's a stable blocker, happy to help if necessary! |
@codebytere I ended up scrapping the approach of using
|
Just put up the PR. It looks like the |
Description of Change
Closes #42033.
Refs #35658
The above PR made it such that we explicitly destroyed the webContents in all BrowserViews currently attached to a give BrowserWindow when the BrowserWindow closed, which was a breaking change from previous BrowserView behavior. We should preserve the previous behavior.
cc @nornagon in case this was for a specific reason i'm not aware of!
Checklist
npm test
passesRelease Notes
Notes: Fixed an issue where
BrowserView
webContents
were destroyed on ownerBrowserWindow
closure.