mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
LibWeb: Port Stream algorithms from JS::SafeFunction to JS::HeapFunction
This commit is contained in:
parent
e118430648
commit
5f484d200a
14 changed files with 211 additions and 189 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Matthew Olsson <mattco@serenityos.org>
|
||||
* Copyright (c) 2023, Shannon Booth <shannon@serenityos.org>
|
||||
* Copyright (c) 2023-2024, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -98,7 +98,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> ReadableByteStreamControl
|
|||
reset_queue(*this);
|
||||
|
||||
// 3. Let result be the result of performing this.[[cancelAlgorithm]], passing in reason.
|
||||
auto result = (*m_cancel_algorithm)(reason);
|
||||
auto result = m_cancel_algorithm->function()(reason);
|
||||
|
||||
// 4. Perform ! ReadableByteStreamControllerClearAlgorithms(this).
|
||||
readable_byte_stream_controller_clear_algorithms(*this);
|
||||
|
@ -201,6 +201,8 @@ void ReadableByteStreamController::visit_edges(Cell::Visitor& visitor)
|
|||
for (auto const& item : m_queue)
|
||||
visitor.visit(item.buffer);
|
||||
visitor.visit(m_stream);
|
||||
visitor.visit(m_cancel_algorithm);
|
||||
visitor.visit(m_pull_algorithm);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue