mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-06 09:01:53 +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,7 +17,7 @@
|
|||
|
||||
namespace Web::Streams {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(ReadableByteStreamController);
|
||||
GC_DEFINE_ALLOCATOR(ReadableByteStreamController);
|
||||
|
||||
// https://streams.spec.whatwg.org/#rbs-controller-desired-size
|
||||
Optional<double> ReadableByteStreamController::desired_size() const
|
||||
|
@ -27,7 +27,7 @@ Optional<double> ReadableByteStreamController::desired_size() const
|
|||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#rbs-controller-byob-request
|
||||
JS::GCPtr<ReadableStreamBYOBRequest> ReadableByteStreamController::byob_request()
|
||||
GC::Ptr<ReadableStreamBYOBRequest> ReadableByteStreamController::byob_request()
|
||||
{
|
||||
// 1. Return ! ReadableByteStreamControllerGetBYOBRequest(this).
|
||||
return readable_byte_stream_controller_get_byob_request(*this);
|
||||
|
@ -71,7 +71,7 @@ void ReadableByteStreamController::initialize(JS::Realm& realm)
|
|||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#rbs-controller-enqueue
|
||||
WebIDL::ExceptionOr<void> ReadableByteStreamController::enqueue(JS::Handle<WebIDL::ArrayBufferView>& chunk)
|
||||
WebIDL::ExceptionOr<void> ReadableByteStreamController::enqueue(GC::Root<WebIDL::ArrayBufferView>& chunk)
|
||||
{
|
||||
// 1. If chunk.[[ByteLength]] is 0, throw a TypeError exception.
|
||||
// 2. If chunk.[[ViewedArrayBuffer]].[[ArrayBufferByteLength]] is 0, throw a TypeError exception.
|
||||
|
@ -91,7 +91,7 @@ WebIDL::ExceptionOr<void> ReadableByteStreamController::enqueue(JS::Handle<WebID
|
|||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#rbs-controller-private-cancel
|
||||
JS::NonnullGCPtr<WebIDL::Promise> ReadableByteStreamController::cancel_steps(JS::Value reason)
|
||||
GC::Ref<WebIDL::Promise> ReadableByteStreamController::cancel_steps(JS::Value reason)
|
||||
{
|
||||
// 1. Perform ! ReadableByteStreamControllerClearPendingPullIntos(this).
|
||||
readable_byte_stream_controller_clear_pending_pull_intos(*this);
|
||||
|
@ -110,7 +110,7 @@ JS::NonnullGCPtr<WebIDL::Promise> ReadableByteStreamController::cancel_steps(JS:
|
|||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#rbs-controller-private-pull
|
||||
void ReadableByteStreamController::pull_steps(JS::NonnullGCPtr<ReadRequest> read_request)
|
||||
void ReadableByteStreamController::pull_steps(GC::Ref<ReadRequest> read_request)
|
||||
{
|
||||
auto& realm = this->realm();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue