Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
env: fix use-after-free in keep-alive allocators
As per comment in the change it is possible that `Environment:AddArrayBufferAllocatorToKeepAliveUntilIsolateDispose` is called from `node::FreeEnvironment(env)` after `node::Stop(env)` was already called. In this case platform's `per_isolate_` map won't have an entry for our isolate and the `AddIsolateFinishedCallback` will invoke the callback immediately leaving us with `keep_alive_allocators_` set to freed pointer. This commit also changes the assertion in the `AddIsolateFinishedCallback` that is triggered incorrectly.
- Loading branch information