Skip to content
Commit Detail

Commit 6a4d54c

Author
Kenton Varda <kenton@cloudflare.com> 2024-05-20 17:30:35 -0500
Parents
93f4d6c
Tree
25e53e6
Fix JsRpcPromise::Resolved context checking.

`IoContext::WeakRef` is a KJ I/O object, so `kj::Own<IoContext::WeakRef>` is not safe to hold from a JSG object. Instead, it would need to be `kj::IoOwn<IoContext::WeakRef>`. But, at that point we don't even need the `WeakRef` anymore because dereferencing the `IoOwn` itself will do exactly the check that we were using the `WeakRef` to do.

Actually, all we really need here is an `IoPtr<T>` (the type of `T` is irrelevant) which we can attempt to dereference in order to effect the context check we want.

Files changed

3 files changed~3 modified