Skip to content

fix: deprecation warning crash when no Node.js environment available #47700

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

Merged
merged 1 commit into from
Jul 16, 2025

Conversation

codebytere
Copy link
Member

Description of Change

If util::EmitDeprecationWarning is called from the renderer process and Node.js integration is disabled, it will crash as node::Environment::GetCurrent(isolate) will be nullptr.

Checklist

Release Notes

Notes: none.

@codebytere codebytere added semver/patch backwards-compatible bug fixes target/36-x-y PR should also be added to the "36-x-y" branch. target/37-x-y PR should also be added to the "37-x-y" branch. target/38-x-y PR should also be added to the "38-x-y" branch. labels Jul 9, 2025
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jul 9, 2025
Copy link
Member

@dsanders11 dsanders11 left a comment

Choose a reason for hiding this comment

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

Is there a particular deprecation warning you've seen cause this crash?

Wondering if the behavior was changed by #46860, but the old code also didn't check if node::Environment::GetCurrent(isolate) was nullptr, so seems like it would have the same issue.

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jul 10, 2025
@codebytere codebytere force-pushed the handle-no-env-deprecation-warning branch from 688c8a4 to dfaa1f0 Compare July 11, 2025 13:50
@codebytere codebytere force-pushed the handle-no-env-deprecation-warning branch from dfaa1f0 to 571c398 Compare July 14, 2025 08:05
@codebytere codebytere merged commit 09ab71d into main Jul 16, 2025
98 of 102 checks passed
@codebytere codebytere deleted the handle-no-env-deprecation-warning branch July 16, 2025 10:46
@release-clerk
Copy link

release-clerk bot commented Jul 16, 2025

No Release Notes

@trop
Copy link
Contributor

trop bot commented Jul 16, 2025

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

@trop trop bot removed the target/38-x-y PR should also be added to the "38-x-y" branch. label Jul 16, 2025
@trop
Copy link
Contributor

trop bot commented Jul 16, 2025

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

@trop
Copy link
Contributor

trop bot commented Jul 16, 2025

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

@trop trop bot added in-flight/36-x-y in-flight/37-x-y and removed target/36-x-y PR should also be added to the "36-x-y" branch. target/37-x-y PR should also be added to the "37-x-y" branch. labels Jul 16, 2025
@trop trop bot added merged/38-x-y PR was merged to the "38-x-y" branch. and removed in-flight/38-x-y labels Jul 16, 2025
@trop trop bot added merged/36-x-y PR was merged to the "36-x-y" branch. merged/37-x-y PR was merged to the "37-x-y" branch. and removed in-flight/36-x-y in-flight/37-x-y labels Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged/36-x-y PR was merged to the "36-x-y" branch. merged/37-x-y PR was merged to the "37-x-y" branch. merged/38-x-y PR was merged to the "38-x-y" branch. semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy