mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibWeb: Remove AbortSignal::follow()
This no longer has any callers. `AbortSignal::create_dependent_abort_signal()` should be used instead.
This commit is contained in:
parent
17e64cf08b
commit
8e6e938167
Notes:
sideshowbarker
2024-07-18 00:54:03 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/8e6e938167 Pull-request: https://github.com/SerenityOS/serenity/pull/23724
2 changed files with 0 additions and 25 deletions
|
@ -108,29 +108,6 @@ void AbortSignal::visit_edges(JS::Cell::Visitor& visitor)
|
|||
visitor.visit(dependent_signal);
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#abortsignal-follow
|
||||
void AbortSignal::follow(JS::NonnullGCPtr<AbortSignal> parent_signal)
|
||||
{
|
||||
// A followingSignal (an AbortSignal) is made to follow a parentSignal (an AbortSignal) by running these steps:
|
||||
|
||||
// 1. If followingSignal is aborted, then return.
|
||||
if (aborted())
|
||||
return;
|
||||
|
||||
// 2. If parentSignal is aborted, then signal abort on followingSignal with parentSignal’s abort reason.
|
||||
if (parent_signal->aborted()) {
|
||||
signal_abort(parent_signal->reason());
|
||||
return;
|
||||
}
|
||||
|
||||
// 3. Otherwise, add the following abort steps to parentSignal:
|
||||
// NOTE: `this` and `parent_signal` are protected by AbortSignal using JS::SafeFunction.
|
||||
parent_signal->add_abort_algorithm([this, parent_signal] {
|
||||
// 1. Signal abort on followingSignal with parentSignal’s abort reason.
|
||||
signal_abort(parent_signal->reason());
|
||||
});
|
||||
}
|
||||
|
||||
// https://dom.spec.whatwg.org/#dom-abortsignal-abort
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<AbortSignal>> AbortSignal::abort(JS::VM& vm, JS::Value reason)
|
||||
{
|
||||
|
|
|
@ -43,8 +43,6 @@ public:
|
|||
|
||||
JS::ThrowCompletionOr<void> throw_if_aborted() const;
|
||||
|
||||
void follow(JS::NonnullGCPtr<AbortSignal> parent_signal);
|
||||
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<AbortSignal>> abort(JS::VM&, JS::Value reason);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<AbortSignal>> timeout(JS::VM&, Web::WebIDL::UnsignedLongLong milliseconds);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<AbortSignal>> any(JS::VM&, JS::Value signals);
|
||||
|
|
Loading…
Reference in a new issue