chromium/third_party/blink/renderer/core/scheduler/dom_task.cc

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

#include "third_party/blink/renderer/core/scheduler/dom_task.h"

#include <optional>
#include <utility>

#include "base/check_op.h"
#include "base/metrics/histogram_macros.h"
#include "third_party/blink/public/common/scheduler/task_attribution_id.h"
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_throw_dom_exception.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_scheduler_post_task_callback.h"
#include "third_party/blink/renderer/core/dom/abort_signal.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/inspector/identifiers_factory.h"
#include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
#include "third_party/blink/renderer/core/probe/core_probes.h"
#include "third_party/blink/renderer/core/scheduler/dom_task_signal.h"
#include "third_party/blink/renderer/core/scheduler/script_wrappable_task_state.h"
#include "third_party/blink/renderer/core/scheduler/web_scheduling_task_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
#include "third_party/blink/renderer/platform/scheduler/public/task_attribution_info.h"
#include "third_party/blink/renderer/platform/scheduler/public/task_attribution_tracker.h"
#include "third_party/blink/renderer/platform/scheduler/public/web_scheduling_priority.h"
#include "third_party/blink/renderer/platform/scheduler/public/web_scheduling_task_queue.h"
#include "third_party/blink/renderer/platform/wtf/casting.h"
#include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"

namespace blink {

namespace {

void GenericTaskData(perfetto::TracedDictionary& dict,
                     ExecutionContext* context,
                     const uint64_t task_id) {}

void SchedulePostTaskCallbackTraceEventData(perfetto::TracedValue trace_context,
                                            ExecutionContext* execution_context,
                                            const uint64_t task_id,
                                            const String& priority,
                                            const double delay) {}

void RunPostTaskCallbackTraceEventData(perfetto::TracedValue trace_context,
                                       ExecutionContext* execution_context,
                                       const uint64_t task_id,
                                       const String& priority,
                                       const double delay) {}

void AbortPostTaskCallbackTraceEventData(perfetto::TracedValue trace_context,
                                         ExecutionContext* execution_context,
                                         uint64_t task_id) {}

}  // namespace

DOMTask::DOMTask(ScriptPromiseResolver<IDLAny>* resolver,
                 V8SchedulerPostTaskCallback* callback,
                 AbortSignal* abort_source,
                 DOMTaskSignal* priority_source,
                 DOMScheduler::DOMTaskQueue* task_queue,
                 base::TimeDelta delay)
    :{}

void DOMTask::Trace(Visitor* visitor) const {}

void DOMTask::Invoke() {}

void DOMTask::InvokeInternal(ScriptState* script_state) {}

void DOMTask::OnAbort() {}

void DOMTask::RemoveAbortAlgorithm() {}

}  // namespace blink