mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: dangling raw_ptr NodeBindings::uv_env_ (#42954)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
@@ -602,6 +602,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() {
|
||||
node_env_->set_trace_sync_io(false);
|
||||
js_env_->DestroyMicrotasksRunner();
|
||||
node::Stop(node_env_.get(), node::StopFlags::kDoNotTerminateIsolate);
|
||||
node_bindings_->set_uv_env(nullptr);
|
||||
node_env_.reset();
|
||||
|
||||
auto default_context_key = ElectronBrowserContext::PartitionKey("", false);
|
||||
|
||||
@@ -155,10 +155,10 @@ class ElectronBrowserMainParts : public content::BrowserMainParts {
|
||||
// Before then, we just exit() without any intermediate steps.
|
||||
std::optional<int> exit_code_;
|
||||
|
||||
std::unique_ptr<NodeBindings> node_bindings_;
|
||||
const std::unique_ptr<NodeBindings> node_bindings_;
|
||||
|
||||
// depends-on: node_bindings_
|
||||
std::unique_ptr<ElectronBindings> electron_bindings_;
|
||||
const std::unique_ptr<ElectronBindings> electron_bindings_;
|
||||
|
||||
// depends-on: node_bindings_
|
||||
std::unique_ptr<JavascriptEnvironment> js_env_;
|
||||
|
||||
Reference in New Issue
Block a user