Skip to content
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: clean up devtools frontend_host on webcontents destroy #40666

Merged
merged 3 commits into from Dec 1, 2023

Conversation

albertxing
Copy link
Contributor

Description of Change

Fixes #40660

Re-using the previous DevToolsFrontendHost instance no longer works, so we need to clean it up when devtools is closed.
Also updates IsInMainFrame to IsInPrimaryMainFrame to match upstream changes: https://chromium-review.googlesource.com/c/chromium/src/+/2957195

Checklist

Release Notes

Notes: Fixed an issue where devtools could not be re-opened.

Copy link

welcome bot commented Dec 1, 2023

💖 Thanks for opening this pull request! 💖

We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix.

Examples of commit messages with semantic prefixes:

  • fix: don't overwrite prevent_default if default wasn't prevented
  • feat: add app.isPackaged() method
  • docs: app.isDefaultProtocolClient is now available on Linux

Things that will help get your PR across the finish line:

  • Follow the JavaScript, C++, and Python coding style.
  • Run npm run lint locally to catch formatting errors earlier.
  • Document any user-facing changes you've made following the documentation styleguide.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Dec 1, 2023
@MarshallOfSound MarshallOfSound added the target/28-x-y PR should also be added to the "28-x-y" branch. label Dec 1, 2023
@VerteDinde VerteDinde added the semver/patch backwards-compatible bug fixes label Dec 1, 2023
@MarshallOfSound MarshallOfSound merged commit 3609fc7 into electron:main Dec 1, 2023
20 of 21 checks passed
Copy link

welcome bot commented Dec 1, 2023

Congrats on merging your first pull request! 🎉🎉🎉

Copy link

release-clerk bot commented Dec 1, 2023

Release Notes Persisted

Fixed an issue where devtools could not be re-opened.

@trop
Copy link
Contributor

trop bot commented Dec 1, 2023

I have automatically backported this PR to "28-x-y", please check out #40679

@trop trop bot added in-flight/28-x-y merged/28-x-y PR was merged to the "28-x-y" branch. and removed target/28-x-y PR should also be added to the "28-x-y" branch. in-flight/28-x-y labels Dec 1, 2023
MrHuangJser pushed a commit to MrHuangJser/electron that referenced this pull request Dec 11, 2023
…#40666)

* fix: clean up devtools frontend_host on destroy

* chore: use IsInPrimaryMainFrame instead of IsInMainFrame

* test: add a test for re-opening devtools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/28-x-y PR was merged to the "28-x-y" branch. new-pr 🌱 PR opened in the last 24 hours semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Can not open devtools after closing
5 participants