143e6a74d8
The only valid way to define a GCed type T is by inheriting from GarbageCollected<T>. Since this is prone to typos (see tests), add a simple check that covers most interesting use cases. The static assert covers A -> B -> GarbageCollected<C> The static assert does not cover A -> B -> C -> GarbageCollected<B> (In order to do so, we would need __direct_bases() support which is not yet available for C++.) Bug: pdfium:1670, chromium:1056170 Change-Id: I494de48992f8ba9a1f0f9daad60584d828717403 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2810415 Reviewed-by: Omer Katz <omerkatz@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#73854} |
||
---|---|---|
.. | ||
cppgc | ||
libplatform | ||
APIDesign.md | ||
DEPS | ||
DIR_METADATA | ||
js_protocol-1.2.json | ||
js_protocol-1.3.json | ||
js_protocol.pdl | ||
OWNERS | ||
v8-cppgc.h | ||
v8-fast-api-calls.h | ||
v8-inspector-protocol.h | ||
v8-inspector.h | ||
v8-internal.h | ||
v8-metrics.h | ||
v8-platform.h | ||
v8-profiler.h | ||
v8-unwinder-state.h | ||
v8-util.h | ||
v8-value-serializer-version.h | ||
v8-version-string.h | ||
v8-version.h | ||
v8-wasm-trap-handler-posix.h | ||
v8-wasm-trap-handler-win.h | ||
v8.h | ||
v8config.h |