-
Notifications
You must be signed in to change notification settings - Fork 16.3k
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
Conversation
There was a problem hiding this 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.
688c8a4
to
dfaa1f0
Compare
dfaa1f0
to
571c398
Compare
No Release Notes |
I have automatically backported this PR to "38-x-y", please check out #47769 |
I have automatically backported this PR to "36-x-y", please check out #47770 |
I have automatically backported this PR to "37-x-y", please check out #47771 |
Description of Change
If
util::EmitDeprecationWarning
is called from the renderer process and Node.js integration is disabled, it will crash asnode::Environment::GetCurrent(isolate)
will benullptr
.Checklist
npm test
passesRelease Notes
Notes: none.