Skip to content

src: simplify Environment::HandleCleanup

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.

src: simplify Environment::HandleCleanup

  • Make the HandleCleanup a struct, and make the queue a std::list, iterate over it in CleanupHandles() and clear it after that.
  • Put the handle cleanup registration into a method and document that they will not be called in the one environemt per process setup.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Merge request reports

Loading