Assuming all GCProtected wrappers are tracked within Caches, this should ensure that their JS object and the cppgc wrapper itself are not collected (or are at least continued to be traced), until the bit is released.
This is done by allocating a dummy object and storing it on the global object of a runtime, which when traced, performs a trace of every object known to its local Caches instance.
Assuming all GCProtected wrappers are tracked within Caches, this should ensure that their JS object and the cppgc wrapper itself are not collected (or are at least continued to be traced), until the bit is released.
This is done by allocating a dummy object and storing it on the global object of a runtime, which when traced, performs a trace of every object known to its local Caches instance.