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 dangling promise in npm install #36379

Merged
merged 3 commits into from Nov 18, 2022
Merged

chore: fix dangling promise in npm install #36379

merged 3 commits into from Nov 18, 2022

Conversation

hyrious
Copy link
Contributor

@hyrious hyrious commented Nov 17, 2022

Description of Change

Fix an unresolved promise introduced in #33979, where the resolve is never called.

This problem was not observable because there's no variable holding reference to the promise, so V8 will correctly GC it. But the code logic still has problem.

Checklist

Release Notes

Notes: no-notes

@hyrious hyrious requested a review from a team as a code owner November 17, 2022 01:30
@welcome
Copy link

welcome bot commented Nov 17, 2022

💖 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 Nov 17, 2022
@hyrious hyrious changed the title Fix dangling promise introduced in #33979 fix: dangling promise introduced in #33979 Nov 17, 2022
npm/install.js Outdated Show resolved Hide resolved
Co-authored-by: Black-Hole <158blackhole@gmail.com>
Copy link
Member

@BlackHole1 BlackHole1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MarshallOfSound MarshallOfSound added semver/patch backwards-compatible bug fixes target/20-x-y target/21-x-y PR should also be added to the "21-x-y" branch. target/22-x-y PR should also be added to the "22-x-y" branch. labels Nov 17, 2022
@codebytere codebytere changed the title fix: dangling promise introduced in #33979 chore: fix dangling promise in npm install Nov 17, 2022
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Nov 18, 2022
@VerteDinde VerteDinde merged commit 9c48992 into electron:main Nov 18, 2022
@welcome
Copy link

welcome bot commented Nov 18, 2022

Congrats on merging your first pull request! 🎉🎉🎉

@release-clerk
Copy link

release-clerk bot commented Nov 18, 2022

No Release Notes

@trop
Copy link
Contributor

trop bot commented Nov 18, 2022

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

@trop trop bot removed the target/22-x-y PR should also be added to the "22-x-y" branch. label Nov 18, 2022
@trop
Copy link
Contributor

trop bot commented Nov 18, 2022

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

@trop
Copy link
Contributor

trop bot commented Nov 18, 2022

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

@trop trop bot added merged/20-x-y merged/21-x-y PR was merged to the "21-x-y" branch. merged/22-x-y PR was merged to the "22-x-y" branch. and removed target/21-x-y PR should also be added to the "21-x-y" branch. target/20-x-y labels Nov 18, 2022
khalwa pushed a commit to solarwindscloud/electron that referenced this pull request Feb 22, 2023
* Fix dangling promise introduced in electron#33979

* fix reject in callback

* simplify code

Co-authored-by: Black-Hole <158blackhole@gmail.com>

Co-authored-by: Black-Hole <158blackhole@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/21-x-y PR was merged to the "21-x-y" branch. merged/22-x-y PR was merged to the "22-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants