fix: iocp integration when process is reused (#33207)

This commit is contained in:
Robo 2022-03-21 16:42:22 +09:00 committed by GitHub
parent e100402b13
commit 4cc2ed842e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 83 additions and 17 deletions

View file

@ -162,8 +162,10 @@ void ElectronRendererClient::WillReleaseScriptContext(
isolate->SetMicrotasksPolicy(v8::MicrotasksPolicy::kExplicit);
node::FreeEnvironment(env);
if (env == node_bindings_->uv_env())
if (node_bindings_->uv_env() == nullptr) {
node::FreeIsolateData(node_bindings_->isolate_data());
node_bindings_->set_isolate_data(nullptr);
}
isolate->SetMicrotasksPolicy(old_policy);