mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 20:33:10 +00:00
LibWeb: Remove unnecessary JS::Handle in AbortSignal::timeout()
This fixes yet another GC reference cycle.
This commit is contained in:
parent
32d065011b
commit
f1eb837c3d
|
@ -138,11 +138,11 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<AbortSignal>> AbortSignal::timeout(JS::VM&
|
|||
VERIFY(window_or_worker);
|
||||
|
||||
// 3. Run steps after a timeout given global, "AbortSignal-timeout", milliseconds, and the following step:
|
||||
window_or_worker->run_steps_after_a_timeout(milliseconds, [&realm, &global, strong_signal = JS::make_handle(signal)]() {
|
||||
window_or_worker->run_steps_after_a_timeout(milliseconds, [&realm, &global, signal]() {
|
||||
// 1. Queue a global task on the timer task source given global to signal abort given signal and a new "TimeoutError" DOMException.
|
||||
HTML::queue_global_task(HTML::Task::Source::TimerTask, global, [&realm, &strong_signal]() mutable {
|
||||
HTML::queue_global_task(HTML::Task::Source::TimerTask, global, [&realm, signal]() mutable {
|
||||
auto reason = WebIDL::TimeoutError::create(realm, "Signal timed out"_fly_string);
|
||||
strong_signal->signal_abort(reason);
|
||||
signal->signal_abort(reason);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue