src: call CleanupHandles in FreeEnvironment
CleanupHandles() has not been called in our own code base anymore after the v8 debug agent has been removed. It used to be in the ~Environment() destructor but then removed to avoid firing other events after the exit event, given that we were not going to clean up handles for the one environment per process setup. Call it in FreeEnvironment so that embedders can clean up the handles in the loop when creating multiple environments. PR-URL: https://github.com/nodejs/node/pull/19319 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jackson Tian <shyvo1987@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
c6ae8a2810
commit
855dabd675
@ -4405,6 +4405,7 @@ Environment* CreateEnvironment(IsolateData* isolate_data,
|
||||
|
||||
|
||||
void FreeEnvironment(Environment* env) {
|
||||
env->CleanupHandles();
|
||||
delete env;
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,6 @@ class EnvironmentTestFixture : public NodeTestFixture {
|
||||
}
|
||||
|
||||
~Env() {
|
||||
environment_->CleanupHandles();
|
||||
node::FreeEnvironment(environment_);
|
||||
node::FreeIsolateData(isolate_data_);
|
||||
context_->Exit();
|
||||
|
Loading…
x
Reference in New Issue
Block a user