Commit Detail
Commit ed7a6e8
JSRPC: Fix lifetime of handles. A TransientJsRpcTarget could outlive the IoContext -- in fact, we already guard against this and prevent it from being used. But it's also possible that the entire isolate shuts down, in which case TransientJsRpcTarget's destructor will have trouble destroying the JS handles it holds. Let's invent a way to solve that, and use it. Hypothetically a better design would be if we could synchronously revoke membranes, such that we can force all JsRpcTarget objects to be destroyed when the IoContext goes away. But MembranePolicy doesn't quite support synchronous revocation, only asynchronous, which doesn't quite solve the problem.
Files changed
4 files changed~4 modified