-
Notifications
You must be signed in to change notification settings - Fork 15k
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: dangling raw_ptr in ElectronBrowserMainParts dtor #39539
fix: dangling raw_ptr in ElectronBrowserMainParts dtor #39539
Conversation
Browser::WhenReady() holds a reference to JsEnv isolate so must come after
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.
Thanks! ❤️
No Release Notes |
I have automatically backported this PR to "24-x-y", please check out #39591 |
I have automatically backported this PR to "25-x-y", please check out #39592 |
I have automatically backported this PR to "27-x-y", please check out #39593 |
I have automatically backported this PR to "26-x-y", please check out #39594 |
* fix: dangling raw_ptr in ElectronBrowserMainParts dtor * fixup! fix: dangling raw_ptr in ElectronBrowserMainParts dtor Browser::WhenReady() holds a reference to JsEnv isolate so must come after
* fix: dangling raw_ptr in ElectronBrowserMainParts dtor * fixup! fix: dangling raw_ptr in ElectronBrowserMainParts dtor Browser::WhenReady() holds a reference to JsEnv isolate so must come after
Description of Change
Another order-of-destruction issue similar to #39521.
js_env_
holds a pointer to the uv loop owned bynode_bindings_
, so whennode_bindings_
is destroyed beforejs_env_
in the EBMP destructor,js_env_
is holding onto a dangling pointer when its destructor is called.CC @deepak1556, @codebytere who reviewed 39521 and @VerteDinde for raw_ptr fun.
Checklist
npm test
passesRelease Notes
Notes: none.