LibGC: Only call finalize() on types that override finalize()

This dramatically cuts down on time spent in the GC's finalizer pass,
since most types don't override finalize().
This commit is contained in:
Andreas Kling
2025-12-29 01:33:12 +01:00
committed by Andreas Kling
parent 75ad452099
commit 2ac363dcba
Notes: github-actions[bot] 2026-01-07 19:52:22 +00:00
44 changed files with 105 additions and 22 deletions

View File

@@ -44,6 +44,8 @@ class IntersectionObserver final : public Bindings::PlatformObject {
GC_DECLARE_ALLOCATOR(IntersectionObserver);
public:
static constexpr bool OVERRIDES_FINALIZE = true;
static WebIDL::ExceptionOr<GC::Ref<IntersectionObserver>> construct_impl(JS::Realm&, GC::Ptr<WebIDL::CallbackType> callback, IntersectionObserverInit const& options = {});
virtual ~IntersectionObserver() override;