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

chore: fix memory leak in v8.serialize() #37774

Merged
merged 1 commit into from
Apr 3, 2023

Conversation

yehengxuan
Copy link

Backport of #37021

See that PR for details.

Notes: Fixed a memory leak in v8.serialize() when running Node.js within Electron.

@yehengxuan yehengxuan requested a review from a team as a code owner March 31, 2023 08:35
@welcome
Copy link

welcome bot commented Mar 31, 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 Mar 31, 2023
@trop trop bot mentioned this pull request Mar 31, 2023
4 tasks
@trop trop bot added 22-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Mar 31, 2023
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Mar 31, 2023
@codebytere codebytere merged commit 62dddd1 into electron:22-x-y Apr 3, 2023
@welcome
Copy link

welcome bot commented Apr 3, 2023

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link

release-clerk bot commented Apr 3, 2023

Release Notes Persisted

Fixed a memory leak in v8.serialize() when running Node.js within Electron.

@rayzhao99
Copy link

It seems this pr would cause renderer process crashed in some cases. We do have reproduced this problem in our project, which always crashes with Electron v22.3.6 but works fine with Electron v22.3.5. Same source codes. And in a previous revision of our projects without the usage of v8.serialize(), it works fine with Electron v22.x version e.g. v22.3.26.

It is also interesting that the crashed project works fine with other higher versions of Electron, such as v26.x & v27.x.

However, a demo project cannot be provided at least by now. I'll try to make one when having time, but it has cost me a lot of time to figure out the problem. So just leave a message first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
22-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.

None yet

3 participants