mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-06 16:19:40 +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
|
@ -13,32 +13,32 @@ namespace Web::Fetch::Infrastructure {
|
|||
|
||||
// https://fetch.spec.whatwg.org/#concept-fetch-record
|
||||
class FetchRecord : public JS::Cell {
|
||||
JS_CELL(FetchRecord, JS::Cell);
|
||||
JS_DECLARE_ALLOCATOR(FetchRecord);
|
||||
GC_CELL(FetchRecord, JS::Cell);
|
||||
GC_DECLARE_ALLOCATOR(FetchRecord);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static JS::NonnullGCPtr<FetchRecord> create(JS::VM&, JS::NonnullGCPtr<Infrastructure::Request>);
|
||||
[[nodiscard]] static JS::NonnullGCPtr<FetchRecord> create(JS::VM&, JS::NonnullGCPtr<Infrastructure::Request>, JS::GCPtr<FetchController>);
|
||||
[[nodiscard]] static GC::Ref<FetchRecord> create(JS::VM&, GC::Ref<Infrastructure::Request>);
|
||||
[[nodiscard]] static GC::Ref<FetchRecord> create(JS::VM&, GC::Ref<Infrastructure::Request>, GC::Ptr<FetchController>);
|
||||
|
||||
[[nodiscard]] JS::NonnullGCPtr<Infrastructure::Request> request() const { return m_request; }
|
||||
void set_request(JS::NonnullGCPtr<Infrastructure::Request> request) { m_request = request; }
|
||||
[[nodiscard]] GC::Ref<Infrastructure::Request> request() const { return m_request; }
|
||||
void set_request(GC::Ref<Infrastructure::Request> request) { m_request = request; }
|
||||
|
||||
[[nodiscard]] JS::GCPtr<FetchController> fetch_controller() const { return m_fetch_controller; }
|
||||
void set_fetch_controller(JS::GCPtr<FetchController> fetch_controller) { m_fetch_controller = fetch_controller; }
|
||||
[[nodiscard]] GC::Ptr<FetchController> fetch_controller() const { return m_fetch_controller; }
|
||||
void set_fetch_controller(GC::Ptr<FetchController> fetch_controller) { m_fetch_controller = fetch_controller; }
|
||||
|
||||
private:
|
||||
explicit FetchRecord(JS::NonnullGCPtr<Infrastructure::Request>);
|
||||
FetchRecord(JS::NonnullGCPtr<Infrastructure::Request>, JS::GCPtr<FetchController>);
|
||||
explicit FetchRecord(GC::Ref<Infrastructure::Request>);
|
||||
FetchRecord(GC::Ref<Infrastructure::Request>, GC::Ptr<FetchController>);
|
||||
|
||||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-request
|
||||
// A fetch record has an associated request (a request)
|
||||
JS::NonnullGCPtr<Infrastructure::Request> m_request;
|
||||
GC::Ref<Infrastructure::Request> m_request;
|
||||
|
||||
// https://fetch.spec.whatwg.org/#fetch-controller
|
||||
// A fetch record has an associated controller (a fetch controller or null)
|
||||
JS::GCPtr<FetchController> m_fetch_controller { nullptr };
|
||||
GC::Ptr<FetchController> m_fetch_controller { nullptr };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue