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 after: 1. `Node::Stop(env)` 2. `Environment::~Environment()` 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