fix: raw_ptr destruction order in NodeBindings (#39762)

This commit is contained in:
Charles Kerr 2023-09-07 18:25:17 -05:00 committed by GitHub
commit 792037b338
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 69 additions and 44 deletions

View file

@ -51,8 +51,8 @@ class ElectronRendererClient : public RendererClientBase {
// Whether the node integration has been initialized.
bool node_integration_initialized_ = false;
std::unique_ptr<NodeBindings> node_bindings_;
std::unique_ptr<ElectronBindings> electron_bindings_;
const std::unique_ptr<NodeBindings> node_bindings_;
const std::unique_ptr<ElectronBindings> electron_bindings_;
// The node::Environment::GetCurrent API does not return nullptr when it
// is called for a context without node::Environment, so we have to keep