LibJS+LibWeb: Use GC::Weak instead of AK::WeakPtr for GC-allocated types

This makes some common types like JS::Object smaller (by 8 bytes) and
yields a minor speed improvement on many benchmarks.
This commit is contained in:
Andreas Kling 2025-10-16 11:13:54 +02:00 committed by Andreas Kling
parent 25a5ed94d6
commit dfa796a4e4
Notes: github-actions[bot] 2025-10-17 15:25:08 +00:00
36 changed files with 111 additions and 115 deletions

View file

@ -9,6 +9,7 @@
#pragma once
#include <LibGC/Weak.h>
#include <LibJS/Heap/Cell.h>
#include <LibWeb/CSS/Enums.h>
#include <LibWeb/CSS/StyleValues/AbstractImageStyleValue.h>
@ -79,7 +80,7 @@ private:
GC::Ptr<CSSStyleSheet> m_style_sheet;
URL m_url;
WeakPtr<DOM::Document> m_document;
GC::Weak<DOM::Document> m_document;
size_t m_current_frame_index { 0 };
size_t m_loops_completed { 0 };