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
8
#include "
src/objects/objects.h
"
9
#include "
src/objects/struct.h
"
10
11
// Has to be the last include (doesn't have include guards):
12
#include "
src/objects/object-macros.h
"
13
14
namespace
v8
{
15
namespace
internal
{
16
17
class
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.
24
class
Microtask
:
public
TorqueGeneratedMicrotask<Microtask, Struct> {
25
public
:
26
TQ_OBJECT_CONSTRUCTORS
(
Microtask
)
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.
32
class
CallbackTask
33
:
public
TorqueGeneratedCallbackTask<CallbackTask, Microtask> {
34
public
:
35
using
BodyDescriptor
=
StructBodyDescriptor
;
36
37
TQ_OBJECT_CONSTRUCTORS
(
CallbackTask
)
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.
43
class
CallableTask
44
:
public
TorqueGeneratedCallableTask<CallableTask, Microtask> {
45
public
:
46
// Dispatched behavior.
47
DECL_VERIFIER
(
CallableTask
)
48
void
BriefPrintDetails
(std::ostream& os);
49
50
using
BodyDescriptor
=
StructBodyDescriptor
;
51
52
TQ_OBJECT_CONSTRUCTORS
(
CallableTask
)
53
};
54
55
}
// namespace internal
56
}
// namespace v8
57
58
#include "
src/objects/object-macros-undef.h
"
59
60
#endif
// V8_OBJECTS_MICROTASK_H_
v8::internal::CallableTask
Definition
microtask.h:44
v8::internal::CallableTask::BriefPrintDetails
void BriefPrintDetails(std::ostream &os)
Definition
objects.cc:1931
v8::internal::CallbackTask
Definition
microtask.h:33
v8::internal::Microtask
Definition
microtask.h:24
v8::internal::StructBodyDescriptor
Definition
objects-body-descriptors.h:191
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
object-macros-undef.h
object-macros.h
DECL_VERIFIER
#define DECL_VERIFIER(Name)
Definition
object-macros.h:962
TQ_OBJECT_CONSTRUCTORS
#define TQ_OBJECT_CONSTRUCTORS(Type)
Definition
object-macros.h:984
objects.h
struct.h
src
objects
microtask.h
Generated on Sun Apr 6 2025 21:08:56 for v8 by
1.12.0