v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
builtins-promise.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_BUILTINS_BUILTINS_PROMISE_H_
6#define V8_BUILTINS_BUILTINS_PROMISE_H_
7
9
10namespace v8 {
11namespace internal {
12
14 public:
16 // The promise which resolve/reject callbacks fulfill.
18
19 // Whether the callback was already invoked.
21
22 // Whether to trigger a debug event or not. Used in catch
23 // prediction.
26 };
27
28 // TODO(bmeurer): Move this to a proper context map in contexts.h?
29 // Similar to the AwaitContext that we introduced for await closures.
42
54
60
61 // This is used by the Promise.prototype.finally builtin to store
62 // onFinally callback and the Promise constructor.
63 // TODO(gsathya): For native promises we can create a variant of
64 // this without extra space for the constructor to save memory.
71
72 // This is used by the ThenFinally and CatchFinally builtins to
73 // store the value to return or reason to throw.
79
80 private:
82};
83
84} // namespace internal
85} // namespace v8
86
87#endif // V8_BUILTINS_BUILTINS_PROMISE_H_
DISALLOW_IMPLICIT_CONSTRUCTORS(PromiseBuiltins)