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
|
@ -17,15 +17,15 @@ namespace Web::FileAPI {
|
|||
// https://w3c.github.io/FileAPI/#dfn-filereader
|
||||
class FileReader : public DOM::EventTarget {
|
||||
WEB_PLATFORM_OBJECT(FileReader, DOM::EventTarget);
|
||||
JS_DECLARE_ALLOCATOR(FileReader);
|
||||
GC_DECLARE_ALLOCATOR(FileReader);
|
||||
|
||||
public:
|
||||
using Result = Variant<Empty, String, JS::Handle<JS::ArrayBuffer>>;
|
||||
using Result = Variant<Empty, String, GC::Root<JS::ArrayBuffer>>;
|
||||
|
||||
virtual ~FileReader() override;
|
||||
|
||||
[[nodiscard]] static JS::NonnullGCPtr<FileReader> create(JS::Realm&);
|
||||
static JS::NonnullGCPtr<FileReader> construct_impl(JS::Realm&);
|
||||
[[nodiscard]] static GC::Ref<FileReader> create(JS::Realm&);
|
||||
static GC::Ref<FileReader> construct_impl(JS::Realm&);
|
||||
|
||||
// async read methods
|
||||
WebIDL::ExceptionOr<void> read_as_array_buffer(Blob&);
|
||||
|
@ -59,7 +59,7 @@ public:
|
|||
Result result() const { return m_result; }
|
||||
|
||||
// https://w3c.github.io/FileAPI/#dom-filereader-error
|
||||
JS::GCPtr<WebIDL::DOMException> error() const { return m_error; }
|
||||
GC::Ptr<WebIDL::DOMException> error() const { return m_error; }
|
||||
|
||||
// event handler attributes
|
||||
void set_onloadstart(WebIDL::CallbackType*);
|
||||
|
@ -111,7 +111,7 @@ private:
|
|||
|
||||
// A FileReader has an associated error (null or a DOMException). It is initially null.
|
||||
// https://w3c.github.io/FileAPI/#filereader-error
|
||||
JS::GCPtr<WebIDL::DOMException> m_error;
|
||||
GC::Ptr<WebIDL::DOMException> m_error;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue