mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 07:22:21 +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,20 +15,20 @@ namespace Web::Streams {
|
|||
// https://streams.spec.whatwg.org/#writablestreamdefaultcontroller
|
||||
class WritableStreamDefaultController final : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(WritableStreamDefaultController, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(WritableStreamDefaultController);
|
||||
GC_DECLARE_ALLOCATOR(WritableStreamDefaultController);
|
||||
|
||||
public:
|
||||
virtual ~WritableStreamDefaultController() override = default;
|
||||
|
||||
void error(JS::Value error);
|
||||
JS::NonnullGCPtr<DOM::AbortSignal> signal() { return *m_signal; }
|
||||
void set_signal(JS::NonnullGCPtr<DOM::AbortSignal> value) { m_signal = value; }
|
||||
GC::Ref<DOM::AbortSignal> signal() { return *m_signal; }
|
||||
void set_signal(GC::Ref<DOM::AbortSignal> value) { m_signal = value; }
|
||||
|
||||
JS::GCPtr<AbortAlgorithm> abort_algorithm() { return m_abort_algorithm; }
|
||||
void set_abort_algorithm(JS::GCPtr<AbortAlgorithm> value) { m_abort_algorithm = value; }
|
||||
GC::Ptr<AbortAlgorithm> abort_algorithm() { return m_abort_algorithm; }
|
||||
void set_abort_algorithm(GC::Ptr<AbortAlgorithm> value) { m_abort_algorithm = value; }
|
||||
|
||||
JS::GCPtr<CloseAlgorithm> close_algorithm() { return m_close_algorithm; }
|
||||
void set_close_algorithm(JS::GCPtr<CloseAlgorithm> value) { m_close_algorithm = value; }
|
||||
GC::Ptr<CloseAlgorithm> close_algorithm() { return m_close_algorithm; }
|
||||
void set_close_algorithm(GC::Ptr<CloseAlgorithm> value) { m_close_algorithm = value; }
|
||||
|
||||
SinglyLinkedList<ValueWithSize>& queue() { return m_queue; }
|
||||
|
||||
|
@ -41,16 +41,16 @@ public:
|
|||
size_t strategy_hwm() const { return m_strategy_hwm; }
|
||||
void set_strategy_hwm(size_t value) { m_strategy_hwm = value; }
|
||||
|
||||
JS::GCPtr<SizeAlgorithm> strategy_size_algorithm() { return m_strategy_size_algorithm; }
|
||||
void set_strategy_size_algorithm(JS::GCPtr<SizeAlgorithm> value) { m_strategy_size_algorithm = value; }
|
||||
GC::Ptr<SizeAlgorithm> strategy_size_algorithm() { return m_strategy_size_algorithm; }
|
||||
void set_strategy_size_algorithm(GC::Ptr<SizeAlgorithm> value) { m_strategy_size_algorithm = value; }
|
||||
|
||||
JS::NonnullGCPtr<WritableStream> stream() { return *m_stream; }
|
||||
void set_stream(JS::NonnullGCPtr<WritableStream> value) { m_stream = value; }
|
||||
GC::Ref<WritableStream> stream() { return *m_stream; }
|
||||
void set_stream(GC::Ref<WritableStream> value) { m_stream = value; }
|
||||
|
||||
JS::GCPtr<WriteAlgorithm> write_algorithm() { return m_write_algorithm; }
|
||||
void set_write_algorithm(JS::GCPtr<WriteAlgorithm> value) { m_write_algorithm = value; }
|
||||
GC::Ptr<WriteAlgorithm> write_algorithm() { return m_write_algorithm; }
|
||||
void set_write_algorithm(GC::Ptr<WriteAlgorithm> value) { m_write_algorithm = value; }
|
||||
|
||||
JS::NonnullGCPtr<WebIDL::Promise> abort_steps(JS::Value reason);
|
||||
GC::Ref<WebIDL::Promise> abort_steps(JS::Value reason);
|
||||
void error_steps();
|
||||
|
||||
private:
|
||||
|
@ -60,11 +60,11 @@ private:
|
|||
|
||||
// https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-abortalgorithm
|
||||
// A promise-returning algorithm, taking one argument (the abort reason), which communicates a requested abort to the underlying sink
|
||||
JS::GCPtr<AbortAlgorithm> m_abort_algorithm;
|
||||
GC::Ptr<AbortAlgorithm> m_abort_algorithm;
|
||||
|
||||
// https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-closealgorithm
|
||||
// A promise-returning algorithm which communicates a requested close to the underlying sink
|
||||
JS::GCPtr<CloseAlgorithm> m_close_algorithm;
|
||||
GC::Ptr<CloseAlgorithm> m_close_algorithm;
|
||||
|
||||
// https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-queue
|
||||
// A list representing the stream’s internal queue of chunks
|
||||
|
@ -76,7 +76,7 @@ private:
|
|||
|
||||
// https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-signal
|
||||
// An AbortSignal that can be used to abort the pending write or close operation when the stream is aborted.
|
||||
JS::GCPtr<DOM::AbortSignal> m_signal;
|
||||
GC::Ptr<DOM::AbortSignal> m_signal;
|
||||
|
||||
// https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-started
|
||||
// A boolean flag indicating whether the underlying sink has finished starting
|
||||
|
@ -88,15 +88,15 @@ private:
|
|||
|
||||
// https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-strategysizealgorithm
|
||||
// An algorithm to calculate the size of enqueued chunks, as part of the stream’s queuing strategy
|
||||
JS::GCPtr<SizeAlgorithm> m_strategy_size_algorithm;
|
||||
GC::Ptr<SizeAlgorithm> m_strategy_size_algorithm;
|
||||
|
||||
// https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-stream
|
||||
// The WritableStream instance controlled
|
||||
JS::GCPtr<WritableStream> m_stream;
|
||||
GC::Ptr<WritableStream> m_stream;
|
||||
|
||||
// https://streams.spec.whatwg.org/#writablestreamdefaultcontroller-writealgorithm
|
||||
// A promise-returning algorithm, taking one argument (the chunk to write), which writes data to the underlying sink
|
||||
JS::GCPtr<WriteAlgorithm> m_write_algorithm;
|
||||
GC::Ptr<WriteAlgorithm> m_write_algorithm;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue