mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +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
|
@ -24,7 +24,7 @@ struct ReadableStreamBYOBReaderReadOptions {
|
|||
|
||||
// https://streams.spec.whatwg.org/#read-into-request
|
||||
class ReadIntoRequest : public JS::Cell {
|
||||
JS_CELL(ReadIntoRequest, JS::Cell);
|
||||
GC_CELL(ReadIntoRequest, JS::Cell);
|
||||
|
||||
public:
|
||||
virtual ~ReadIntoRequest() = default;
|
||||
|
@ -44,18 +44,18 @@ class ReadableStreamBYOBReader final
|
|||
: public Bindings::PlatformObject
|
||||
, public ReadableStreamGenericReaderMixin {
|
||||
WEB_PLATFORM_OBJECT(ReadableStreamBYOBReader, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(ReadableStreamBYOBReader);
|
||||
GC_DECLARE_ALLOCATOR(ReadableStreamBYOBReader);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<ReadableStreamBYOBReader>> construct_impl(JS::Realm&, JS::NonnullGCPtr<ReadableStream>);
|
||||
static WebIDL::ExceptionOr<GC::Ref<ReadableStreamBYOBReader>> construct_impl(JS::Realm&, GC::Ref<ReadableStream>);
|
||||
|
||||
virtual ~ReadableStreamBYOBReader() override = default;
|
||||
|
||||
JS::NonnullGCPtr<WebIDL::Promise> read(JS::Handle<WebIDL::ArrayBufferView>&, ReadableStreamBYOBReaderReadOptions options = {});
|
||||
GC::Ref<WebIDL::Promise> read(GC::Root<WebIDL::ArrayBufferView>&, ReadableStreamBYOBReaderReadOptions options = {});
|
||||
|
||||
void release_lock();
|
||||
|
||||
Vector<JS::NonnullGCPtr<ReadIntoRequest>>& read_into_requests() { return m_read_into_requests; }
|
||||
Vector<GC::Ref<ReadIntoRequest>>& read_into_requests() { return m_read_into_requests; }
|
||||
|
||||
private:
|
||||
explicit ReadableStreamBYOBReader(JS::Realm&);
|
||||
|
@ -66,7 +66,7 @@ private:
|
|||
|
||||
// https://streams.spec.whatwg.org/#readablestreambyobreader-readintorequests
|
||||
// A list of read-into requests, used when a consumer requests chunks sooner than they are available
|
||||
Vector<JS::NonnullGCPtr<ReadIntoRequest>> m_read_into_requests;
|
||||
Vector<GC::Ref<ReadIntoRequest>> m_read_into_requests;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue