mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 22:59:33 +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
|
@ -10,8 +10,8 @@
|
|||
#include <AK/String.h>
|
||||
#include <AK/Variant.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibGC/Ptr.h>
|
||||
#include <LibJS/Forward.h>
|
||||
#include <LibJS/Heap/GCPtr.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/Fetch/Infrastructure/HTTP/Headers.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
@ -23,7 +23,7 @@ using HeadersInit = Variant<Vector<Vector<String>>, OrderedHashMap<String, Strin
|
|||
// https://fetch.spec.whatwg.org/#headers-class
|
||||
class Headers final : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(Headers, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(Headers);
|
||||
GC_DECLARE_ALLOCATOR(Headers);
|
||||
|
||||
public:
|
||||
enum class Guard {
|
||||
|
@ -34,12 +34,12 @@ public:
|
|||
None,
|
||||
};
|
||||
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<Headers>> construct_impl(JS::Realm& realm, Optional<HeadersInit> const& init);
|
||||
static WebIDL::ExceptionOr<GC::Ref<Headers>> construct_impl(JS::Realm& realm, Optional<HeadersInit> const& init);
|
||||
|
||||
virtual ~Headers() override;
|
||||
|
||||
[[nodiscard]] JS::NonnullGCPtr<Infrastructure::HeaderList> header_list() const { return m_header_list; }
|
||||
void set_header_list(JS::NonnullGCPtr<Infrastructure::HeaderList> header_list) { m_header_list = header_list; }
|
||||
[[nodiscard]] GC::Ref<Infrastructure::HeaderList> header_list() const { return m_header_list; }
|
||||
void set_header_list(GC::Ref<Infrastructure::HeaderList> header_list) { m_header_list = header_list; }
|
||||
|
||||
[[nodiscard]] Guard guard() const { return m_guard; }
|
||||
void set_guard(Guard guard) { m_guard = guard; }
|
||||
|
@ -61,7 +61,7 @@ public:
|
|||
private:
|
||||
friend class HeadersIterator;
|
||||
|
||||
Headers(JS::Realm&, JS::NonnullGCPtr<Infrastructure::HeaderList>);
|
||||
Headers(JS::Realm&, GC::Ref<Infrastructure::HeaderList>);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(JS::Cell::Visitor&) override;
|
||||
|
@ -71,7 +71,7 @@ private:
|
|||
|
||||
// https://fetch.spec.whatwg.org/#concept-headers-header-list
|
||||
// A Headers object has an associated header list (a header list), which is initially empty.
|
||||
JS::NonnullGCPtr<Infrastructure::HeaderList> m_header_list;
|
||||
GC::Ref<Infrastructure::HeaderList> m_header_list;
|
||||
|
||||
// https://fetch.spec.whatwg.org/#concept-headers-guard
|
||||
// A Headers object also has an associated guard, which is a headers guard. A headers guard is "immutable", "request", "request-no-cors", "response" or "none".
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue