mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
LibWeb: Add internal slots [[cancelAlgorithm]] and [[finishPromise]]
This adds internal slots [[cancelAlgorithm]] and [[finishPromise]] to TransformStreamDefaultController.
This commit is contained in:
parent
afb74eca52
commit
ff5be1fd36
Notes:
sideshowbarker
2024-07-16 18:26:46 +09:00
Author: https://github.com/kennethmyhra Commit: https://github.com/LadybirdBrowser/ladybird/commit/ff5be1fd36 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/95
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Kenneth Myhra <kennethmyhra@serenityos.org>
|
||||
* Copyright (c) 2023-2024, Kenneth Myhra <kennethmyhra@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@ -30,6 +30,8 @@ void TransformStreamDefaultController::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_stream);
|
||||
visitor.visit(m_cancel_algorithm);
|
||||
visitor.visit(m_finish_promise);
|
||||
visitor.visit(m_flush_algorithm);
|
||||
visitor.visit(m_transform_algorithm);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2023, Kenneth Myhra <kennethmyhra@serenityos.org>
|
||||
* Copyright (c) 2023-2024, Kenneth Myhra <kennethmyhra@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
@ -24,6 +24,12 @@ public:
|
||||
void error(Optional<JS::Value> reason = {});
|
||||
void terminate();
|
||||
|
||||
JS::GCPtr<CancelAlgorithm> cancel_algorithm() { return m_cancel_algorithm; }
|
||||
void set_cancel_algorithm(JS::GCPtr<CancelAlgorithm> value) { m_cancel_algorithm = value; }
|
||||
|
||||
JS::GCPtr<JS::PromiseCapability> finish_promise() { return m_finish_promise; }
|
||||
void set_finish_promise(JS::GCPtr<JS::PromiseCapability> value) { m_finish_promise = value; }
|
||||
|
||||
JS::GCPtr<FlushAlgorithm> flush_algorithm() { return m_flush_algorithm; }
|
||||
void set_flush_algorithm(JS::GCPtr<FlushAlgorithm>&& value) { m_flush_algorithm = move(value); }
|
||||
|
||||
@ -38,6 +44,12 @@ private:
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
// https://streams.spec.whatwg.org/#transformstreamdefaultcontroller-cancelalgorithm
|
||||
JS::GCPtr<CancelAlgorithm> m_cancel_algorithm;
|
||||
|
||||
// https://streams.spec.whatwg.org/#transformstreamdefaultcontroller-finishpromise
|
||||
JS::GCPtr<JS::PromiseCapability> m_finish_promise;
|
||||
|
||||
// https://streams.spec.whatwg.org/#transformstreamdefaultcontroller-flushalgorithm
|
||||
JS::GCPtr<FlushAlgorithm> m_flush_algorithm;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user