1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 02:57:36 +00:00

LibWeb/Streams: Add WritableStreamDefaultController::visit_edges()

This commit is contained in:
Andreas Kling 2023-08-09 18:15:38 +02:00
parent 26d5d86682
commit 40bdcdf966
2 changed files with 12 additions and 0 deletions

View file

@ -4,11 +4,21 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/DOM/AbortSignal.h>
#include <LibWeb/Streams/WritableStream.h>
#include <LibWeb/Streams/WritableStreamDefaultController.h>
namespace Web::Streams {
void WritableStreamDefaultController::visit_edges(Visitor& visitor)
{
Base::visit_edges(visitor);
visitor.visit(m_signal);
for (auto& value : m_queue)
visitor.visit(value.value);
visitor.visit(m_stream);
}
// https://streams.spec.whatwg.org/#ws-default-controller-error
WebIDL::ExceptionOr<void> WritableStreamDefaultController::error(JS::Value error)
{

View file

@ -55,6 +55,8 @@ public:
private:
explicit WritableStreamDefaultController(JS::Realm&);
virtual void visit_edges(Visitor&) override;
// 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
Optional<AbortAlgorithm> m_abort_algorithm;