mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-16 23:31:55 +00:00
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:
parent
ce23efc5f6
commit
f87041bf3a
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth
Commit: f87041bf3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
1722 changed files with 9939 additions and 9906 deletions
|
@ -15,10 +15,10 @@ namespace Web::HTML {
|
|||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigationdestination
|
||||
class NavigationDestination : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(NavigationDestination, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(NavigationDestination);
|
||||
GC_DECLARE_ALLOCATOR(NavigationDestination);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static JS::NonnullGCPtr<NavigationDestination> create(JS::Realm&);
|
||||
[[nodiscard]] static GC::Ref<NavigationDestination> create(JS::Realm&);
|
||||
|
||||
WebIDL::ExceptionOr<String> url() const;
|
||||
String key() const;
|
||||
|
@ -28,11 +28,11 @@ public:
|
|||
WebIDL::ExceptionOr<JS::Value> get_state();
|
||||
|
||||
// Non-spec'd getter, not exposed to JS
|
||||
JS::GCPtr<NavigationHistoryEntry> navigation_history_entry() const { return m_entry; }
|
||||
GC::Ptr<NavigationHistoryEntry> navigation_history_entry() const { return m_entry; }
|
||||
|
||||
// Setters are not available to JS, but expected in many spec algorithms
|
||||
void set_url(URL::URL const& url) { m_url = url; }
|
||||
void set_entry(JS::GCPtr<NavigationHistoryEntry> entry) { m_entry = entry; }
|
||||
void set_entry(GC::Ptr<NavigationHistoryEntry> entry) { m_entry = entry; }
|
||||
void set_state(SerializationRecord state) { m_state = move(state); }
|
||||
void set_is_same_document(bool b) { m_is_same_document = b; }
|
||||
|
||||
|
@ -50,7 +50,7 @@ private:
|
|||
URL::URL m_url;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-navigationdestination-url
|
||||
JS::GCPtr<NavigationHistoryEntry> m_entry;
|
||||
GC::Ptr<NavigationHistoryEntry> m_entry;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#concept-navigationdestination-state
|
||||
SerializationRecord m_state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue