cppgc-js: Fix TraceTrait for TracedReference
The trait is expected to return a nullptr for the base address. This is required for ephemeron tracing to trigger eagerly tracing a value. This will be required when Blink uses a type alias to TracedReference. Bug: v8:12165 Change-Id: Ibe142eaff41616c9de6ae0db9878f8489a5e4142 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3253345 Reviewed-by: Omer Katz <omerkatz@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/main@{#77619}
This commit is contained in:
parent
15b1ce39a8
commit
39d58fd909
@ -318,6 +318,11 @@ namespace cppgc {
|
||||
|
||||
template <typename T>
|
||||
struct TraceTrait<v8::TracedReference<T>> {
|
||||
static cppgc::TraceDescriptor GetTraceDescriptor(
|
||||
const v8::TracedReference<T>* ref) {
|
||||
return {nullptr, Trace};
|
||||
}
|
||||
|
||||
static void Trace(Visitor* visitor, const v8::TracedReference<T>* self) {
|
||||
static_cast<v8::JSVisitor*>(visitor)->Trace(*self);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user