fix: dangling raw_ptr NodeBindings::uv_env_ (#42933)
This commit is contained in:
parent
bc345db351
commit
5773a2dce6
2 changed files with 3 additions and 2 deletions
|
@ -604,6 +604,7 @@ void ElectronBrowserMainParts::PostMainMessageLoopRun() {
|
||||||
node_env_->set_trace_sync_io(false);
|
node_env_->set_trace_sync_io(false);
|
||||||
js_env_->DestroyMicrotasksRunner();
|
js_env_->DestroyMicrotasksRunner();
|
||||||
node::Stop(node_env_.get(), node::StopFlags::kDoNotTerminateIsolate);
|
node::Stop(node_env_.get(), node::StopFlags::kDoNotTerminateIsolate);
|
||||||
|
node_bindings_->set_uv_env(nullptr);
|
||||||
node_env_.reset();
|
node_env_.reset();
|
||||||
|
|
||||||
auto default_context_key = ElectronBrowserContext::PartitionKey("", false);
|
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.
|
// Before then, we just exit() without any intermediate steps.
|
||||||
std::optional<int> exit_code_;
|
std::optional<int> exit_code_;
|
||||||
|
|
||||||
std::unique_ptr<NodeBindings> node_bindings_;
|
const std::unique_ptr<NodeBindings> node_bindings_;
|
||||||
|
|
||||||
// depends-on: node_bindings_
|
// depends-on: node_bindings_
|
||||||
std::unique_ptr<ElectronBindings> electron_bindings_;
|
const std::unique_ptr<ElectronBindings> electron_bindings_;
|
||||||
|
|
||||||
// depends-on: node_bindings_
|
// depends-on: node_bindings_
|
||||||
std::unique_ptr<JavascriptEnvironment> js_env_;
|
std::unique_ptr<JavascriptEnvironment> js_env_;
|
||||||
|
|
Loading…
Reference in a new issue