Commit ed2c7070 authored by Omer Katz's avatar Omer Katz Committed by Commit Bot

cppgc: Use full qualifier in prefinalizer macro.

Pdfium folks can't build pre-finalizers due to the missing qualifier.

Bug: chromium:1056170
Change-Id: Ib90859880e845c714c52f10ee50841ac46bcb0ef
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2339477
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Reviewed-by: 's avatarAnton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69254}
parent f08bd2ce
......@@ -30,21 +30,21 @@ class PrefinalizerRegistration final {
} // namespace internal
#define CPPGC_USING_PRE_FINALIZER(Class, PreFinalizer) \
public: \
static bool InvokePreFinalizer(const LivenessBroker& liveness_broker, \
void* object) { \
static_assert(internal::IsGarbageCollectedTypeV<Class>, \
"Only garbage collected objects can have prefinalizers"); \
Class* self = static_cast<Class*>(object); \
if (liveness_broker.IsHeapObjectAlive(self)) return false; \
self->Class::PreFinalizer(); \
return true; \
} \
\
private: \
CPPGC_NO_UNIQUE_ADDRESS internal::PrefinalizerRegistration<Class> \
prefinalizer_dummy_{this}; \
#define CPPGC_USING_PRE_FINALIZER(Class, PreFinalizer) \
public: \
static bool InvokePreFinalizer(const cppgc::LivenessBroker& liveness_broker, \
void* object) { \
static_assert(cppgc::internal::IsGarbageCollectedTypeV<Class>, \
"Only garbage collected objects can have prefinalizers"); \
Class* self = static_cast<Class*>(object); \
if (liveness_broker.IsHeapObjectAlive(self)) return false; \
self->Class::PreFinalizer(); \
return true; \
} \
\
private: \
CPPGC_NO_UNIQUE_ADDRESS cppgc::internal::PrefinalizerRegistration<Class> \
prefinalizer_dummy_{this}; \
static_assert(true, "Force semicolon.")
} // namespace cppgc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment