LibGC+Everywhere: Factor out a LibGC from LibJS

Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
This commit is contained in:
Shannon Booth 2024-11-15 04:01:23 +13:00 committed by Andreas Kling
parent ce23efc5f6
commit f87041bf3a
Notes: github-actions[bot] 2024-11-15 13:50:17 +00:00
1722 changed files with 9939 additions and 9906 deletions

View file

@ -14,24 +14,24 @@ namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationtransition
class NavigationTransition : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(NavigationTransition, Bindings::PlatformObject);
JS_DECLARE_ALLOCATOR(NavigationTransition);
GC_DECLARE_ALLOCATOR(NavigationTransition);
public:
[[nodiscard]] static JS::NonnullGCPtr<NavigationTransition> create(JS::Realm&, Bindings::NavigationType, JS::NonnullGCPtr<NavigationHistoryEntry>, JS::NonnullGCPtr<WebIDL::Promise>);
[[nodiscard]] static GC::Ref<NavigationTransition> create(JS::Realm&, Bindings::NavigationType, GC::Ref<NavigationHistoryEntry>, GC::Ref<WebIDL::Promise>);
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigationtransition-navigationtype
Bindings::NavigationType navigation_type() const { return m_navigation_type; }
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigationtransition-from
JS::NonnullGCPtr<NavigationHistoryEntry> from() const { return m_from_entry; }
GC::Ref<NavigationHistoryEntry> from() const { return m_from_entry; }
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigationtransition-finished
JS::NonnullGCPtr<WebIDL::Promise> finished() const { return m_finished_promise; }
GC::Ref<WebIDL::Promise> finished() const { return m_finished_promise; }
virtual ~NavigationTransition() override;
private:
NavigationTransition(JS::Realm&, Bindings::NavigationType, JS::NonnullGCPtr<NavigationHistoryEntry>, JS::NonnullGCPtr<WebIDL::Promise>);
NavigationTransition(JS::Realm&, Bindings::NavigationType, GC::Ref<NavigationHistoryEntry>, GC::Ref<WebIDL::Promise>);
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(JS::Cell::Visitor&) override;
@ -40,10 +40,10 @@ private:
Bindings::NavigationType m_navigation_type;
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-navigationtransition-from
JS::NonnullGCPtr<NavigationHistoryEntry> m_from_entry;
GC::Ref<NavigationHistoryEntry> m_from_entry;
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-navigationtransition-finished
JS::NonnullGCPtr<WebIDL::Promise> m_finished_promise;
GC::Ref<WebIDL::Promise> m_finished_promise;
};
}