Skip to content
Commit Detail

Commit 08edebb

Author
Erik Corry <ecorry@cloudflare.com> 2025-06-10 16:50:24 +0200
Parents
8c3c22f
Tree
52f0054
Pass a jsg::Lock to wrap and unwrap so we can get the isolate from it (#4244)

* Pass a jsg::Lock to wrap and unwrap so we can get the isolate from it

In #4208 we reduced the use of context->GetCurrent since is is only a wrapper around v8::Isolate::GetCurrent.

However, discussion there raised the issue that v8::Isolate::GetCurrent is potentially slow and messy since it gets the isolate from thread-local storage. It was agreed that it would be better to pass the jsg::Lock (which has the isolate) to those functions that need it. This change implements that suggestion.

Files changed