Skip to content
Commit Detail

Commit 8514ca1

Author
James M Snell <jsnell@cloudflare.com> 2025-08-27 07:16:25 -0700
Parents
40955ef
Tree
eb81396
Restrict JSG_STRUCT from having v8 local members

Make it a compile time error for a JSG_STRUCT to have
members that are v8 locals (includig JsValues).

It's not entirely safe for a JSG_STRUCT to use v8 locals
because the struct may outlive the v8 HandleScope in
which the locals were created. Let's enforce it at compile
time.

Update src/workerd/jsg/struct-test.c++

Files changed