chromium/third_party/blink/renderer/core/scheduler/dom_task_continuation.h

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_SCHEDULER_DOM_TASK_CONTINUATION_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_SCHEDULER_DOM_TASK_CONTINUATION_H_

#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/core/dom/abort_signal.h"
#include "third_party/blink/renderer/core/probe/async_task_context.h"
#include "third_party/blink/renderer/core/scheduler/dom_scheduler.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cancellable_task.h"

namespace blink {

// `DOMTaskContinuation` represents the continuation of a task, e.g. tasks
// scheduled with postTask or setTimeout, event listeners, rAF, etc.  It will
// keep itself alive until `DOMTaskContinuation::Invoke` is called, which may be
// after the promise resolver' v8 context is invalid, in which case, the
// continuation will not be run.
class DOMTaskContinuation final : public GarbageCollected<DOMTaskContinuation> {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_SCHEDULER_DOM_TASK_CONTINUATION_H_