v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
microtask.h
Go to the documentation of this file.
1// Copyright 2018 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef V8_OBJECTS_MICROTASK_H_
6#define V8_OBJECTS_MICROTASK_H_
7
10
11// Has to be the last include (doesn't have include guards):
13
14namespace v8 {
15namespace internal {
16
17class StructBodyDescriptor;
18
19#include "torque-generated/src/objects/microtask-tq.inc"
20
21// Abstract base class for all microtasks that can be scheduled on the
22// microtask queue. This class merely serves the purpose of a marker
23// interface.
24class Microtask : public TorqueGeneratedMicrotask<Microtask, Struct> {
25 public:
27};
28
29// A CallbackTask is a special Microtask that allows us to schedule
30// C++ microtask callbacks on the microtask queue. This is heavily
31// used by Blink for example.
33 : public TorqueGeneratedCallbackTask<CallbackTask, Microtask> {
34 public:
36
38};
39
40// A CallableTask is a special (internal) Microtask that allows us to
41// schedule arbitrary callables on the microtask queue. We use this
42// for various tests of the microtask queue.
44 : public TorqueGeneratedCallableTask<CallableTask, Microtask> {
45 public:
46 // Dispatched behavior.
48 void BriefPrintDetails(std::ostream& os);
49
51
53};
54
55} // namespace internal
56} // namespace v8
57
59
60#endif // V8_OBJECTS_MICROTASK_H_
void BriefPrintDetails(std::ostream &os)
Definition objects.cc:1931
#define DECL_VERIFIER(Name)
#define TQ_OBJECT_CONSTRUCTORS(Type)