Handler for embedder roots on non-unified heap garbage collections.
Definition at line 7994 of file v8.h.
Returns true if the TracedGlobal handle should be considered as root for the currently running non-tracing garbage collection and false otherwise. The default implementation will keep all TracedGlobal references as roots.
If this returns false, then V8 may decide that the object referred to by such a handle is reclaimed. In that case:
- No action is required if handles are used with destructors, i.e., by just using |TracedGlobal|.
- When run without destructors, i.e., by using |TracedReference|, V8 calls |ResetRoot|.
Note that the |handle| is different from the handle that the embedder holds for retaining the object. The embedder may use |WrapperClassId()| to distinguish cases where it wants handles to be treated as roots from not being treated as roots.