Coverage Report

Created: 2025-07-04 09:33

/src/node/deps/v8/include/v8-local-handle.h
Line
Count
Source (jump to first uncovered line)
1
// Copyright 2021 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 INCLUDE_V8_LOCAL_HANDLE_H_
6
#define INCLUDE_V8_LOCAL_HANDLE_H_
7
8
#include <stddef.h>
9
10
#include <type_traits>
11
#include <vector>
12
13
#include "v8-handle-base.h"  // NOLINT(build/include_directory)
14
#include "v8-internal.h"     // NOLINT(build/include_directory)
15
16
namespace v8 {
17
18
template <class T>
19
class LocalBase;
20
template <class T>
21
class Local;
22
template <class T>
23
class LocalVector;
24
template <class F>
25
class MaybeLocal;
26
27
template <class T>
28
class Eternal;
29
template <class T>
30
class Global;
31
32
template <class T>
33
class NonCopyablePersistentTraits;
34
template <class T>
35
class PersistentBase;
36
template <class T, class M = NonCopyablePersistentTraits<T>>
37
class Persistent;
38
39
class TracedReferenceBase;
40
template <class T>
41
class BasicTracedReference;
42
template <class F>
43
class TracedReference;
44
45
class Boolean;
46
class Context;
47
class EscapableHandleScope;
48
template <class F>
49
class FunctionCallbackInfo;
50
class Isolate;
51
class Object;
52
template <class F1, class F2, class F3>
53
class PersistentValueMapBase;
54
template <class F1, class F2>
55
class PersistentValueVector;
56
class Primitive;
57
class Private;
58
template <class F>
59
class PropertyCallbackInfo;
60
template <class F>
61
class ReturnValue;
62
class String;
63
template <class F>
64
class Traced;
65
class Utils;
66
67
namespace debug {
68
class ConsoleCallArguments;
69
}
70
71
namespace internal {
72
template <typename T>
73
class CustomArguments;
74
template <typename T>
75
class LocalUnchecked;
76
class SamplingHeapProfiler;
77
}  // namespace internal
78
79
namespace api_internal {
80
// Called when ToLocalChecked is called on an empty Local.
81
V8_EXPORT void ToLocalEmpty();
82
}  // namespace api_internal
83
84
/**
85
 * A stack-allocated class that governs a number of local handles.
86
 * After a handle scope has been created, all local handles will be
87
 * allocated within that handle scope until either the handle scope is
88
 * deleted or another handle scope is created.  If there is already a
89
 * handle scope and a new one is created, all allocations will take
90
 * place in the new handle scope until it is deleted.  After that,
91
 * new handles will again be allocated in the original handle scope.
92
 *
93
 * After the handle scope of a local handle has been deleted the
94
 * garbage collector will no longer track the object stored in the
95
 * handle and may deallocate it.  The behavior of accessing a handle
96
 * for which the handle scope has been deleted is undefined.
97
 */
98
class V8_EXPORT V8_NODISCARD HandleScope {
99
 public:
100
  explicit HandleScope(Isolate* isolate);
101
102
  ~HandleScope();
103
104
  /**
105
   * Counts the number of allocated handles.
106
   */
107
  static int NumberOfHandles(Isolate* isolate);
108
109
134k
  V8_INLINE Isolate* GetIsolate() const {
110
134k
    return reinterpret_cast<Isolate*>(i_isolate_);
111
134k
  }
112
113
  HandleScope(const HandleScope&) = delete;
114
  void operator=(const HandleScope&) = delete;
115
116
  static internal::Address* CreateHandleForCurrentIsolate(
117
      internal::Address value);
118
119
 protected:
120
  V8_INLINE HandleScope() = default;
121
122
  void Initialize(Isolate* isolate);
123
124
  static internal::Address* CreateHandle(internal::Isolate* i_isolate,
125
                                         internal::Address value);
126
127
 private:
128
  // Declaring operator new and delete as deleted is not spec compliant.
129
  // Therefore declare them private instead to disable dynamic alloc
130
  void* operator new(size_t size);
131
  void* operator new[](size_t size);
132
  void operator delete(void*, size_t);
133
  void operator delete[](void*, size_t);
134
135
  internal::Isolate* i_isolate_;
136
  internal::Address* prev_next_;
137
  internal::Address* prev_limit_;
138
#ifdef V8_ENABLE_CHECKS
139
  int scope_level_ = 0;
140
#endif
141
142
  // LocalBase<T>::New uses CreateHandle with an Isolate* parameter.
143
  template <typename T>
144
  friend class LocalBase;
145
146
  // Object::GetInternalField and Context::GetEmbedderData use CreateHandle with
147
  // a HeapObject in their shortcuts.
148
  friend class Object;
149
  friend class Context;
150
};
151
152
/**
153
 * A base class for local handles.
154
 * Its implementation depends on whether direct local support is enabled.
155
 * When it is, a local handle contains a direct pointer to the referenced
156
 * object, otherwise it contains an indirect pointer.
157
 */
158
#ifdef V8_ENABLE_DIRECT_LOCAL
159
160
template <typename T>
161
class LocalBase : public api_internal::DirectHandleBase {
162
 protected:
163
  template <class F>
164
  friend class Local;
165
166
  V8_INLINE LocalBase() = default;
167
168
  V8_INLINE explicit LocalBase(internal::Address ptr) : DirectHandleBase(ptr) {}
169
170
  template <typename S>
171
  V8_INLINE LocalBase(const LocalBase<S>& other) : DirectHandleBase(other) {}
172
173
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
174
    return LocalBase<T>(value);
175
  }
176
177
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
178
    return LocalBase<T>::New(isolate,
179
                             internal::ValueHelper::ValueAsAddress(that));
180
  }
181
182
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
183
    return LocalBase<T>(*slot);
184
  }
185
};
186
187
#else  // !V8_ENABLE_DIRECT_LOCAL
188
189
template <typename T>
190
class LocalBase : public api_internal::IndirectHandleBase {
191
 protected:
192
  template <class F>
193
  friend class Local;
194
195
1.07G
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::ObjectTemplate>::LocalBase()
Line
Count
Source
195
4.82M
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Value>::LocalBase()
Line
Count
Source
195
824M
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Function>::LocalBase()
Line
Count
Source
195
26.8M
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Context>::LocalBase()
Line
Count
Source
195
11.3k
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Object>::LocalBase()
Line
Count
Source
195
6.23M
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::String>::LocalBase()
Line
Count
Source
195
152M
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Signature>::LocalBase()
Line
Count
Source
195
42.6M
  V8_INLINE LocalBase() = default;
Unexecuted instantiation: v8::LocalBase<v8::Uint32Array>::LocalBase()
Unexecuted instantiation: v8::LocalBase<v8::Float64Array>::LocalBase()
v8::LocalBase<v8::Array>::LocalBase()
Line
Count
Source
195
1.20k
  V8_INLINE LocalBase() = default;
Unexecuted instantiation: v8::LocalBase<v8::Private>::LocalBase()
v8::LocalBase<v8::Symbol>::LocalBase()
Line
Count
Source
195
2.27k
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::FunctionTemplate>::LocalBase()
Line
Count
Source
195
3.71M
  V8_INLINE LocalBase() = default;
Unexecuted instantiation: v8::LocalBase<v8::Script>::LocalBase()
Unexecuted instantiation: v8::LocalBase<v8::Int32Array>::LocalBase()
v8::LocalBase<v8::Uint8Array>::LocalBase()
Line
Count
Source
195
10
  V8_INLINE LocalBase() = default;
Unexecuted instantiation: v8::LocalBase<v8::Module>::LocalBase()
Unexecuted instantiation: v8::LocalBase<v8::Promise>::LocalBase()
Unexecuted instantiation: v8::LocalBase<v8::Promise::Resolver>::LocalBase()
v8::LocalBase<v8::ArrayBuffer>::LocalBase()
Line
Count
Source
195
269k
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Data>::LocalBase()
Line
Count
Source
195
12.5M
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Boolean>::LocalBase()
Line
Count
Source
195
2.27k
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::ArrayBufferView>::LocalBase()
Line
Count
Source
195
1.13k
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::UnboundScript>::LocalBase()
Line
Count
Source
195
1.13k
  V8_INLINE LocalBase() = default;
Unexecuted instantiation: v8::LocalBase<v8::BigInt64Array>::LocalBase()
Unexecuted instantiation: v8::LocalBase<v8::StackTrace>::LocalBase()
Unexecuted instantiation: v8::LocalBase<v8::WasmMemoryObject>::LocalBase()
v8::LocalBase<v8::Name>::LocalBase()
Line
Count
Source
195
51.0k
  V8_INLINE LocalBase() = default;
Unexecuted instantiation: v8::LocalBase<v8::Number>::LocalBase()
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase()
Unexecuted instantiation: v8::LocalBase<v8::Int32>::LocalBase()
Unexecuted instantiation: v8::LocalBase<v8::Uint32>::LocalBase()
196
197
  V8_INLINE explicit LocalBase(internal::Address* location)
198
260M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Value>::LocalBase(unsigned long*)
Line
Count
Source
198
42.0M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Primitive>::LocalBase(unsigned long*)
Line
Count
Source
198
12.4M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Boolean>::LocalBase(unsigned long*)
Line
Count
Source
198
39.3M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Object>::LocalBase(unsigned long*)
Line
Count
Source
198
7.45M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::String>::LocalBase(unsigned long*)
Line
Count
Source
198
121M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Symbol>::LocalBase(unsigned long*)
Line
Count
Source
198
5.29M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::FunctionTemplate>::LocalBase(unsigned long*)
Line
Count
Source
198
2.91M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Uint32Array>::LocalBase(unsigned long*)
Line
Count
Source
198
942k
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Float64Array>::LocalBase(unsigned long*)
Line
Count
Source
198
672k
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Array>::LocalBase(unsigned long*)
Line
Count
Source
198
5.38M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::ObjectTemplate>::LocalBase(unsigned long*)
Line
Count
Source
198
4.96M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Int32Array>::LocalBase(unsigned long*)
Line
Count
Source
198
359k
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Uint8Array>::LocalBase(unsigned long*)
Line
Count
Source
198
538k
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Private>::LocalBase(unsigned long*)
Line
Count
Source
198
3.33M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Context>::LocalBase(unsigned long*)
Line
Count
Source
198
153k
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Function>::LocalBase(unsigned long*)
Line
Count
Source
198
12.5M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Data>::LocalBase(unsigned long*)
Line
Count
Source
198
5.71k
      : IndirectHandleBase(location) {}
Unexecuted instantiation: v8::LocalBase<v8::Promise>::LocalBase(unsigned long*)
Unexecuted instantiation: v8::LocalBase<v8::Module>::LocalBase(unsigned long*)
Unexecuted instantiation: v8::LocalBase<v8::ArrayBuffer>::LocalBase(unsigned long*)
v8::LocalBase<v8::UnboundScript>::LocalBase(unsigned long*)
Line
Count
Source
198
1.13k
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::BigInt64Array>::LocalBase(unsigned long*)
Line
Count
Source
198
269k
      : IndirectHandleBase(location) {}
Unexecuted instantiation: v8::LocalBase<v8::StackTrace>::LocalBase(unsigned long*)
v8::LocalBase<v8::Integer>::LocalBase(unsigned long*)
Line
Count
Source
198
151
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Map>::LocalBase(unsigned long*)
Line
Count
Source
198
134k
      : IndirectHandleBase(location) {}
Unexecuted instantiation: v8::LocalBase<v8::WasmMemoryObject>::LocalBase(unsigned long*)
Unexecuted instantiation: v8::LocalBase<v8::ArrayBufferView>::LocalBase(unsigned long*)
199
200
  template <typename S>
201
826M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Name>::LocalBase<v8::String>(v8::LocalBase<v8::String> const&)
Line
Count
Source
201
125M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::String>(v8::LocalBase<v8::String> const&)
Line
Count
Source
201
352M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Object>(v8::LocalBase<v8::Object> const&)
Line
Count
Source
201
32.2M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Object>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
4.06M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Array>(v8::LocalBase<v8::Array> const&)
Line
Count
Source
201
5.84M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Primitive>(v8::LocalBase<v8::Primitive> const&)
Line
Count
Source
201
11.9M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Boolean>(v8::LocalBase<v8::Boolean> const&)
Line
Count
Source
201
39.0M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Function>(v8::LocalBase<v8::Function> const&)
Line
Count
Source
201
19.8M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Integer>(v8::LocalBase<v8::Integer> const&)
Line
Count
Source
201
68.5M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::FunctionTemplate>(v8::LocalBase<v8::FunctionTemplate> const&)
Line
Count
Source
201
1.23M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Number>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
9
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Function>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
3.86M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Number>(v8::LocalBase<v8::Number> const&)
Line
Count
Source
201
61.0M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Symbol>(v8::LocalBase<v8::Symbol> const&)
Line
Count
Source
201
4.94M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Template>::LocalBase<v8::ObjectTemplate>(v8::LocalBase<v8::ObjectTemplate> const&)
Line
Count
Source
201
22.7M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Uint32Array>(v8::LocalBase<v8::Uint32Array> const&)
Line
Count
Source
201
942k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Float64Array>(v8::LocalBase<v8::Float64Array> const&)
Line
Count
Source
201
672k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Name>(v8::LocalBase<v8::Name> const&)
Line
Count
Source
201
51.9k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Array>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
143k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Int32>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
127k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::String>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
16.5M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::ObjectTemplate>(v8::LocalBase<v8::ObjectTemplate> const&)
Line
Count
Source
201
4.08M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Int32Array>(v8::LocalBase<v8::Int32Array> const&)
Line
Count
Source
201
359k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Uint8Array>(v8::LocalBase<v8::Uint8Array> const&)
Line
Count
Source
201
269k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::Private>(v8::LocalBase<v8::Private> const&)
Line
Count
Source
201
10.0M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::Promise>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
v8::LocalBase<v8::Uint32>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
1.39k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Name>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
8.51k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::Uint8Array>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Unexecuted instantiation: v8::LocalBase<v8::String>::LocalBase<v8::Data>(v8::LocalBase<v8::Data> const&)
Unexecuted instantiation: v8::LocalBase<v8::FixedArray>::LocalBase<v8::Data>(v8::LocalBase<v8::Data> const&)
Unexecuted instantiation: v8::LocalBase<v8::Symbol>::LocalBase<v8::Data>(v8::LocalBase<v8::Data> const&)
Unexecuted instantiation: v8::LocalBase<v8::Data>::LocalBase<v8::Module>(v8::LocalBase<v8::Module> const&)
v8::LocalBase<v8::Data>::LocalBase<v8::String>(v8::LocalBase<v8::String> const&)
Line
Count
Source
201
134k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Data>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
90.5k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::Data>::LocalBase<v8::Object>(v8::LocalBase<v8::Object> const&)
v8::LocalBase<v8::Value>::LocalBase<v8::Data>(v8::LocalBase<v8::Data> const&)
Line
Count
Source
201
5.71k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Symbol>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
2.27k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Primitive>::LocalBase<v8::Symbol>(v8::LocalBase<v8::Symbol> const&)
Line
Count
Source
201
288k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::ArrayBufferView>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
36.7k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Data>::LocalBase<v8::PrimitiveArray>(v8::LocalBase<v8::PrimitiveArray> const&)
Line
Count
Source
201
364k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::ModuleRequest>::LocalBase<v8::Data>(v8::LocalBase<v8::Data> const&)
v8::LocalBase<v8::Boolean>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
136k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::Promise>(v8::LocalBase<v8::Promise> const&)
v8::LocalBase<v8::Data>::LocalBase<v8::Primitive>(v8::LocalBase<v8::Primitive> const&)
Line
Count
Source
201
452k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::ArrayBuffer>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
9
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Value>::LocalBase<v8::ArrayBuffer>(v8::LocalBase<v8::ArrayBuffer> const&)
Line
Count
Source
201
22
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::SharedArrayBuffer>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
v8::LocalBase<v8::Integer>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
1.19k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::ArrayBufferView>::LocalBase<v8::Object>(v8::LocalBase<v8::Object> const&)
Line
Count
Source
201
163k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Object>::LocalBase<v8::Uint8Array>(v8::LocalBase<v8::Uint8Array> const&)
Line
Count
Source
201
3.72k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::Set>(v8::LocalBase<v8::Set> const&)
v8::LocalBase<v8::Data>::LocalBase<v8::FunctionTemplate>(v8::LocalBase<v8::FunctionTemplate> const&)
Line
Count
Source
201
34.9M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Name>::LocalBase<v8::Symbol>(v8::LocalBase<v8::Symbol> const&)
Line
Count
Source
201
90.4k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Data>::LocalBase<v8::UnboundScript>(v8::LocalBase<v8::UnboundScript> const&)
Line
Count
Source
201
1.13k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::Promise::Resolver>(v8::LocalBase<v8::Promise::Resolver> const&)
v8::LocalBase<v8::Value>::LocalBase<v8::BigInt64Array>(v8::LocalBase<v8::BigInt64Array> const&)
Line
Count
Source
201
269k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::Promise::Resolver>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
v8::LocalBase<v8::String>::LocalBase<v8::Name>(v8::LocalBase<v8::Name> const&)
Line
Count
Source
201
630k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::BigInt>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
v8::LocalBase<v8::Data>::LocalBase<v8::Integer>(v8::LocalBase<v8::Integer> const&)
Line
Count
Source
201
224k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Data>::LocalBase<v8::Symbol>(v8::LocalBase<v8::Symbol> const&)
Line
Count
Source
201
134k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::Promise::Resolver>::LocalBase<v8::Promise>(v8::LocalBase<v8::Promise> const&)
Unexecuted instantiation: v8::LocalBase<v8::Promise>::LocalBase<v8::Promise::Resolver>(v8::LocalBase<v8::Promise::Resolver> const&)
Unexecuted instantiation: v8::LocalBase<v8::Data>::LocalBase<v8::Promise>(v8::LocalBase<v8::Promise> const&)
Unexecuted instantiation: v8::LocalBase<v8::ArrayBuffer>::LocalBase<v8::Object>(v8::LocalBase<v8::Object> const&)
Unexecuted instantiation: v8::LocalBase<v8::Primitive>::LocalBase<v8::String>(v8::LocalBase<v8::String> const&)
v8::LocalBase<v8::Value>::LocalBase<v8::Map>(v8::LocalBase<v8::Map> const&)
Line
Count
Source
201
269k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::Float64Array>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::SharedArrayBuffer>(v8::LocalBase<v8::SharedArrayBuffer> const&)
Unexecuted instantiation: v8::LocalBase<v8::Object>::LocalBase<v8::Promise>(v8::LocalBase<v8::Promise> const&)
Unexecuted instantiation: v8::LocalBase<v8::Proxy>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Unexecuted instantiation: v8::LocalBase<v8::External>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
v8::LocalBase<v8::Data>::LocalBase<v8::Private>(v8::LocalBase<v8::Private> const&)
Line
Count
Source
201
1.88M
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::WasmMemoryObject>(v8::LocalBase<v8::WasmMemoryObject> const&)
Unexecuted instantiation: v8::LocalBase<v8::WasmMemoryObject>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
v8::LocalBase<v8::Uint32Array>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Line
Count
Source
201
5.72k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
v8::LocalBase<v8::Data>::LocalBase<v8::Function>(v8::LocalBase<v8::Function> const&)
Line
Count
Source
201
5.72k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::Array>::LocalBase<v8::Object>(v8::LocalBase<v8::Object> const&)
v8::LocalBase<v8::Data>::LocalBase<v8::Boolean>(v8::LocalBase<v8::Boolean> const&)
Line
Count
Source
201
317k
  V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}
Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::ArrayBufferView>(v8::LocalBase<v8::ArrayBufferView> const&)
Unexecuted instantiation: v8::LocalBase<v8::Map>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::BigInt>(v8::LocalBase<v8::BigInt> const&)
Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::External>(v8::LocalBase<v8::External> const&)
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase<v8::Int8Array>(v8::LocalBase<v8::Int8Array> const&)
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase<v8::Uint8Array>(v8::LocalBase<v8::Uint8Array> const&)
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase<v8::Uint8ClampedArray>(v8::LocalBase<v8::Uint8ClampedArray> const&)
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase<v8::Int16Array>(v8::LocalBase<v8::Int16Array> const&)
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase<v8::Uint16Array>(v8::LocalBase<v8::Uint16Array> const&)
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase<v8::Int32Array>(v8::LocalBase<v8::Int32Array> const&)
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase<v8::Uint32Array>(v8::LocalBase<v8::Uint32Array> const&)
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase<v8::Float32Array>(v8::LocalBase<v8::Float32Array> const&)
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase<v8::Float64Array>(v8::LocalBase<v8::Float64Array> const&)
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase<v8::BigInt64Array>(v8::LocalBase<v8::BigInt64Array> const&)
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase<v8::BigUint64Array>(v8::LocalBase<v8::BigUint64Array> const&)
Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::TypedArray>(v8::LocalBase<v8::TypedArray> const&)
Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::DataView>(v8::LocalBase<v8::DataView> const&)
Unexecuted instantiation: v8::LocalBase<v8::DataView>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
Unexecuted instantiation: v8::LocalBase<v8::Date>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&)
202
203
4.04M
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
4.04M
    return LocalBase(HandleScope::CreateHandle(
205
4.04M
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
4.04M
  }
v8::LocalBase<v8::Value>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
4.55k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
4.55k
    return LocalBase(HandleScope::CreateHandle(
205
4.55k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
4.55k
  }
v8::LocalBase<v8::Data>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
5.71k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
5.71k
    return LocalBase(HandleScope::CreateHandle(
205
5.71k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
5.71k
  }
Unexecuted instantiation: v8::LocalBase<v8::Int8Array>::New(v8::Isolate*, unsigned long)
v8::LocalBase<v8::Uint8Array>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
538k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
538k
    return LocalBase(HandleScope::CreateHandle(
205
538k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
538k
  }
Unexecuted instantiation: v8::LocalBase<v8::Int16Array>::New(v8::Isolate*, unsigned long)
Unexecuted instantiation: v8::LocalBase<v8::Uint16Array>::New(v8::Isolate*, unsigned long)
v8::LocalBase<v8::Int32Array>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
359k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
359k
    return LocalBase(HandleScope::CreateHandle(
205
359k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
359k
  }
v8::LocalBase<v8::Uint32Array>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
942k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
942k
    return LocalBase(HandleScope::CreateHandle(
205
942k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
942k
  }
Unexecuted instantiation: v8::LocalBase<v8::Float32Array>::New(v8::Isolate*, unsigned long)
v8::LocalBase<v8::Float64Array>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
672k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
672k
    return LocalBase(HandleScope::CreateHandle(
205
672k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
672k
  }
v8::LocalBase<v8::BigInt64Array>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
269k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
269k
    return LocalBase(HandleScope::CreateHandle(
205
269k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
269k
  }
v8::LocalBase<v8::Object>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
1.10M
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
1.10M
    return LocalBase(HandleScope::CreateHandle(
205
1.10M
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
1.10M
  }
v8::LocalBase<v8::Context>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
152k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
152k
    return LocalBase(HandleScope::CreateHandle(
205
152k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
152k
  }
Unexecuted instantiation: v8::LocalBase<v8::Array>::New(v8::Isolate*, unsigned long)
v8::LocalBase<v8::Function>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
2
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
2
    return LocalBase(HandleScope::CreateHandle(
205
2
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
2
  }
Unexecuted instantiation: v8::LocalBase<v8::Promise>::New(v8::Isolate*, unsigned long)
Unexecuted instantiation: v8::LocalBase<v8::Module>::New(v8::Isolate*, unsigned long)
Unexecuted instantiation: v8::LocalBase<v8::ArrayBuffer>::New(v8::Isolate*, unsigned long)
v8::LocalBase<v8::UnboundScript>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
1.13k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
1.13k
    return LocalBase(HandleScope::CreateHandle(
205
1.13k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
1.13k
  }
Unexecuted instantiation: v8::LocalBase<v8::WasmMemoryObject>::New(v8::Isolate*, unsigned long)
Unexecuted instantiation: v8::LocalBase<v8::ArrayBufferView>::New(v8::Isolate*, unsigned long)
Unexecuted instantiation: v8::LocalBase<v8::FunctionTemplate>::New(v8::Isolate*, unsigned long)
207
208
4.03M
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
4.03M
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
4.03M
    return LocalBase<T>::New(isolate,
211
4.03M
                             internal::ValueHelper::ValueAsAddress(that));
212
4.03M
  }
v8::LocalBase<v8::Value>::New(v8::Isolate*, v8::Value*)
Line
Count
Source
208
2
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
2
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
2
    return LocalBase<T>::New(isolate,
211
2
                             internal::ValueHelper::ValueAsAddress(that));
212
2
  }
Unexecuted instantiation: v8::LocalBase<v8::Int8Array>::New(v8::Isolate*, v8::Int8Array*)
v8::LocalBase<v8::Uint8Array>::New(v8::Isolate*, v8::Uint8Array*)
Line
Count
Source
208
538k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
538k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
538k
    return LocalBase<T>::New(isolate,
211
538k
                             internal::ValueHelper::ValueAsAddress(that));
212
538k
  }
Unexecuted instantiation: v8::LocalBase<v8::Int16Array>::New(v8::Isolate*, v8::Int16Array*)
Unexecuted instantiation: v8::LocalBase<v8::Uint16Array>::New(v8::Isolate*, v8::Uint16Array*)
v8::LocalBase<v8::Int32Array>::New(v8::Isolate*, v8::Int32Array*)
Line
Count
Source
208
359k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
359k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
359k
    return LocalBase<T>::New(isolate,
211
359k
                             internal::ValueHelper::ValueAsAddress(that));
212
359k
  }
v8::LocalBase<v8::Uint32Array>::New(v8::Isolate*, v8::Uint32Array*)
Line
Count
Source
208
942k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
942k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
942k
    return LocalBase<T>::New(isolate,
211
942k
                             internal::ValueHelper::ValueAsAddress(that));
212
942k
  }
Unexecuted instantiation: v8::LocalBase<v8::Float32Array>::New(v8::Isolate*, v8::Float32Array*)
v8::LocalBase<v8::Float64Array>::New(v8::Isolate*, v8::Float64Array*)
Line
Count
Source
208
672k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
672k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
672k
    return LocalBase<T>::New(isolate,
211
672k
                             internal::ValueHelper::ValueAsAddress(that));
212
672k
  }
v8::LocalBase<v8::BigInt64Array>::New(v8::Isolate*, v8::BigInt64Array*)
Line
Count
Source
208
269k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
269k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
269k
    return LocalBase<T>::New(isolate,
211
269k
                             internal::ValueHelper::ValueAsAddress(that));
212
269k
  }
v8::LocalBase<v8::Object>::New(v8::Isolate*, v8::Object*)
Line
Count
Source
208
1.10M
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
1.10M
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
1.10M
    return LocalBase<T>::New(isolate,
211
1.10M
                             internal::ValueHelper::ValueAsAddress(that));
212
1.10M
  }
v8::LocalBase<v8::Context>::New(v8::Isolate*, v8::Context*)
Line
Count
Source
208
152k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
152k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
152k
    return LocalBase<T>::New(isolate,
211
152k
                             internal::ValueHelper::ValueAsAddress(that));
212
152k
  }
Unexecuted instantiation: v8::LocalBase<v8::Array>::New(v8::Isolate*, v8::Array*)
v8::LocalBase<v8::Function>::New(v8::Isolate*, v8::Function*)
Line
Count
Source
208
2
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
2
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
2
    return LocalBase<T>::New(isolate,
211
2
                             internal::ValueHelper::ValueAsAddress(that));
212
2
  }
Unexecuted instantiation: v8::LocalBase<v8::Promise>::New(v8::Isolate*, v8::Promise*)
Unexecuted instantiation: v8::LocalBase<v8::Module>::New(v8::Isolate*, v8::Module*)
Unexecuted instantiation: v8::LocalBase<v8::ArrayBuffer>::New(v8::Isolate*, v8::ArrayBuffer*)
v8::LocalBase<v8::UnboundScript>::New(v8::Isolate*, v8::UnboundScript*)
Line
Count
Source
208
1.13k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
1.13k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
1.13k
    return LocalBase<T>::New(isolate,
211
1.13k
                             internal::ValueHelper::ValueAsAddress(that));
212
1.13k
  }
Unexecuted instantiation: v8::LocalBase<v8::WasmMemoryObject>::New(v8::Isolate*, v8::WasmMemoryObject*)
Unexecuted instantiation: v8::LocalBase<v8::ArrayBufferView>::New(v8::Isolate*, v8::ArrayBufferView*)
Unexecuted instantiation: v8::LocalBase<v8::FunctionTemplate>::New(v8::Isolate*, v8::FunctionTemplate*)
213
214
256M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
256M
    return LocalBase<T>(slot);
216
256M
  }
v8::LocalBase<v8::String>::FromSlot(unsigned long*)
Line
Count
Source
214
121M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
121M
    return LocalBase<T>(slot);
216
121M
  }
v8::LocalBase<v8::Primitive>::FromSlot(unsigned long*)
Line
Count
Source
214
12.4M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
12.4M
    return LocalBase<T>(slot);
216
12.4M
  }
v8::LocalBase<v8::Boolean>::FromSlot(unsigned long*)
Line
Count
Source
214
39.3M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
39.3M
    return LocalBase<T>(slot);
216
39.3M
  }
v8::LocalBase<v8::Value>::FromSlot(unsigned long*)
Line
Count
Source
214
42.0M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
42.0M
    return LocalBase<T>(slot);
216
42.0M
  }
v8::LocalBase<v8::Private>::FromSlot(unsigned long*)
Line
Count
Source
214
3.33M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
3.33M
    return LocalBase<T>(slot);
216
3.33M
  }
v8::LocalBase<v8::Symbol>::FromSlot(unsigned long*)
Line
Count
Source
214
5.29M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
5.29M
    return LocalBase<T>(slot);
216
5.29M
  }
v8::LocalBase<v8::FunctionTemplate>::FromSlot(unsigned long*)
Line
Count
Source
214
2.91M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
2.91M
    return LocalBase<T>(slot);
216
2.91M
  }
v8::LocalBase<v8::ObjectTemplate>::FromSlot(unsigned long*)
Line
Count
Source
214
4.96M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
4.96M
    return LocalBase<T>(slot);
216
4.96M
  }
v8::LocalBase<v8::Object>::FromSlot(unsigned long*)
Line
Count
Source
214
6.35M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
6.35M
    return LocalBase<T>(slot);
216
6.35M
  }
v8::LocalBase<v8::Array>::FromSlot(unsigned long*)
Line
Count
Source
214
5.38M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
5.38M
    return LocalBase<T>(slot);
216
5.38M
  }
Unexecuted instantiation: v8::LocalBase<v8::Uint32Array>::FromSlot(unsigned long*)
Unexecuted instantiation: v8::LocalBase<v8::Uint8Array>::FromSlot(unsigned long*)
Unexecuted instantiation: v8::LocalBase<v8::Float64Array>::FromSlot(unsigned long*)
Unexecuted instantiation: v8::LocalBase<v8::Int32Array>::FromSlot(unsigned long*)
Unexecuted instantiation: v8::LocalBase<v8::Promise>::FromSlot(unsigned long*)
v8::LocalBase<v8::Function>::FromSlot(unsigned long*)
Line
Count
Source
214
12.5M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
12.5M
    return LocalBase<T>(slot);
216
12.5M
  }
v8::LocalBase<v8::Context>::FromSlot(unsigned long*)
Line
Count
Source
214
1.13k
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
1.13k
    return LocalBase<T>(slot);
216
1.13k
  }
Unexecuted instantiation: v8::LocalBase<v8::StackTrace>::FromSlot(unsigned long*)
Unexecuted instantiation: v8::LocalBase<v8::BigInt64Array>::FromSlot(unsigned long*)
v8::LocalBase<v8::Integer>::FromSlot(unsigned long*)
Line
Count
Source
214
151
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
151
    return LocalBase<T>(slot);
216
151
  }
v8::LocalBase<v8::Map>::FromSlot(unsigned long*)
Line
Count
Source
214
134k
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
134k
    return LocalBase<T>(slot);
216
134k
  }
217
};
218
219
#endif  // V8_ENABLE_DIRECT_LOCAL
220
221
/**
222
 * An object reference managed by the v8 garbage collector.
223
 *
224
 * All objects returned from v8 have to be tracked by the garbage collector so
225
 * that it knows that the objects are still alive.  Also, because the garbage
226
 * collector may move objects, it is unsafe to point directly to an object.
227
 * Instead, all objects are stored in handles which are known by the garbage
228
 * collector and updated whenever an object moves.  Handles should always be
229
 * passed by value (except in cases like out-parameters) and they should never
230
 * be allocated on the heap.
231
 *
232
 * There are two types of handles: local and persistent handles.
233
 *
234
 * Local handles are light-weight and transient and typically used in local
235
 * operations.  They are managed by HandleScopes. That means that a HandleScope
236
 * must exist on the stack when they are created and that they are only valid
237
 * inside of the HandleScope active during their creation. For passing a local
238
 * handle to an outer HandleScope, an EscapableHandleScope and its Escape()
239
 * method must be used.
240
 *
241
 * Persistent handles can be used when storing objects across several
242
 * independent operations and have to be explicitly deallocated when they're no
243
 * longer used.
244
 *
245
 * It is safe to extract the object stored in the handle by dereferencing the
246
 * handle (for instance, to extract the Object* from a Local<Object>); the value
247
 * will still be governed by a handle behind the scenes and the same rules apply
248
 * to these values as to their handles.
249
 */
250
template <class T>
251
class V8_TRIVIAL_ABI Local : public LocalBase<T>,
252
#ifdef V8_ENABLE_LOCAL_OFF_STACK_CHECK
253
                             public api_internal::StackAllocated<true>
254
#else
255
                             public api_internal::StackAllocated<false>
256
#endif
257
{
258
 public:
259
1.07G
  V8_INLINE Local() = default;
v8::Local<v8::ObjectTemplate>::Local()
Line
Count
Source
259
4.82M
  V8_INLINE Local() = default;
v8::Local<v8::Value>::Local()
Line
Count
Source
259
824M
  V8_INLINE Local() = default;
v8::Local<v8::Function>::Local()
Line
Count
Source
259
26.8M
  V8_INLINE Local() = default;
v8::Local<v8::Context>::Local()
Line
Count
Source
259
11.3k
  V8_INLINE Local() = default;
v8::Local<v8::Object>::Local()
Line
Count
Source
259
6.23M
  V8_INLINE Local() = default;
v8::Local<v8::String>::Local()
Line
Count
Source
259
152M
  V8_INLINE Local() = default;
v8::Local<v8::Signature>::Local()
Line
Count
Source
259
42.6M
  V8_INLINE Local() = default;
v8::Local<v8::Array>::Local()
Line
Count
Source
259
1.20k
  V8_INLINE Local() = default;
Unexecuted instantiation: v8::Local<v8::Private>::Local()
v8::Local<v8::Symbol>::Local()
Line
Count
Source
259
2.27k
  V8_INLINE Local() = default;
v8::Local<v8::FunctionTemplate>::Local()
Line
Count
Source
259
3.71M
  V8_INLINE Local() = default;
Unexecuted instantiation: v8::Local<v8::Script>::Local()
Unexecuted instantiation: v8::Local<v8::Module>::Local()
Unexecuted instantiation: v8::Local<v8::Promise>::Local()
Unexecuted instantiation: v8::Local<v8::Promise::Resolver>::Local()
v8::Local<v8::ArrayBuffer>::Local()
Line
Count
Source
259
269k
  V8_INLINE Local() = default;
v8::Local<v8::Uint8Array>::Local()
Line
Count
Source
259
10
  V8_INLINE Local() = default;
v8::Local<v8::Data>::Local()
Line
Count
Source
259
12.5M
  V8_INLINE Local() = default;
v8::Local<v8::Boolean>::Local()
Line
Count
Source
259
2.27k
  V8_INLINE Local() = default;
v8::Local<v8::ArrayBufferView>::Local()
Line
Count
Source
259
1.13k
  V8_INLINE Local() = default;
v8::Local<v8::UnboundScript>::Local()
Line
Count
Source
259
1.13k
  V8_INLINE Local() = default;
Unexecuted instantiation: v8::Local<v8::StackTrace>::Local()
v8::Local<v8::Name>::Local()
Line
Count
Source
259
51.0k
  V8_INLINE Local() = default;
Unexecuted instantiation: v8::Local<v8::Number>::Local()
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local()
Unexecuted instantiation: v8::Local<v8::Int32>::Local()
Unexecuted instantiation: v8::Local<v8::Uint32>::Local()
260
261
  template <class S>
262
735M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
735M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
735M
  }
v8::Local<v8::Name>::Local<v8::String>(v8::Local<v8::String>)
Line
Count
Source
262
125M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
125M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
125M
  }
v8::Local<v8::Value>::Local<v8::String>(v8::Local<v8::String>)
Line
Count
Source
262
305M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
305M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
305M
  }
v8::Local<v8::Value>::Local<v8::Object>(v8::Local<v8::Object>)
Line
Count
Source
262
32.2M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
32.2M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
32.2M
  }
v8::Local<v8::Value>::Local<v8::Array>(v8::Local<v8::Array>)
Line
Count
Source
262
5.84M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
5.84M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
5.84M
  }
v8::Local<v8::Value>::Local<v8::Primitive>(v8::Local<v8::Primitive>)
Line
Count
Source
262
11.9M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
11.9M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
11.9M
  }
v8::Local<v8::Value>::Local<v8::Boolean>(v8::Local<v8::Boolean>)
Line
Count
Source
262
39.0M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
39.0M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
39.0M
  }
v8::Local<v8::Value>::Local<v8::Function>(v8::Local<v8::Function>)
Line
Count
Source
262
19.8M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
19.8M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
19.8M
  }
v8::Local<v8::Value>::Local<v8::Integer>(v8::Local<v8::Integer>)
Line
Count
Source
262
68.5M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
68.5M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
68.5M
  }
v8::Local<v8::Value>::Local<v8::Number>(v8::Local<v8::Number>)
Line
Count
Source
262
61.0M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
61.0M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
61.0M
  }
v8::Local<v8::Value>::Local<v8::Symbol>(v8::Local<v8::Symbol>)
Line
Count
Source
262
2.52M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
2.52M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
2.52M
  }
v8::Local<v8::Template>::Local<v8::ObjectTemplate>(v8::Local<v8::ObjectTemplate>)
Line
Count
Source
262
22.7M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
22.7M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
22.7M
  }
v8::Local<v8::Value>::Local<v8::Uint32Array>(v8::Local<v8::Uint32Array>)
Line
Count
Source
262
942k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
942k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
942k
  }
v8::Local<v8::Value>::Local<v8::Float64Array>(v8::Local<v8::Float64Array>)
Line
Count
Source
262
672k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
672k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
672k
  }
v8::Local<v8::Value>::Local<v8::Name>(v8::Local<v8::Name>)
Line
Count
Source
262
51.9k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
51.9k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
51.9k
  }
v8::Local<v8::Value>::Local<v8::Int32Array>(v8::Local<v8::Int32Array>)
Line
Count
Source
262
359k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
359k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
359k
  }
v8::Local<v8::Value>::Local<v8::Uint8Array>(v8::Local<v8::Uint8Array>)
Line
Count
Source
262
269k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
269k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
269k
  }
Unexecuted instantiation: v8::Local<v8::Data>::Local<v8::Module>(v8::Local<v8::Module>)
v8::Local<v8::Data>::Local<v8::String>(v8::Local<v8::String>)
Line
Count
Source
262
134k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
134k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
134k
  }
v8::Local<v8::Data>::Local<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
262
90.5k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
90.5k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
90.5k
  }
Unexecuted instantiation: v8::Local<v8::Data>::Local<v8::Object>(v8::Local<v8::Object>)
v8::Local<v8::Primitive>::Local<v8::Symbol>(v8::Local<v8::Symbol>)
Line
Count
Source
262
288k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
288k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
288k
  }
v8::Local<v8::Data>::Local<v8::PrimitiveArray>(v8::Local<v8::PrimitiveArray>)
Line
Count
Source
262
364k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
364k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
364k
  }
Unexecuted instantiation: v8::Local<v8::Value>::Local<v8::Promise>(v8::Local<v8::Promise>)
v8::Local<v8::Data>::Local<v8::Primitive>(v8::Local<v8::Primitive>)
Line
Count
Source
262
452k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
452k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
452k
  }
v8::Local<v8::Value>::Local<v8::ArrayBuffer>(v8::Local<v8::ArrayBuffer>)
Line
Count
Source
262
22
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
22
    static_assert(std::is_base_of<T, S>::value, "type check");
269
22
  }
v8::Local<v8::Object>::Local<v8::Uint8Array>(v8::Local<v8::Uint8Array>)
Line
Count
Source
262
3.72k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
3.72k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
3.72k
  }
Unexecuted instantiation: v8::Local<v8::Value>::Local<v8::Set>(v8::Local<v8::Set>)
v8::Local<v8::Data>::Local<v8::FunctionTemplate>(v8::Local<v8::FunctionTemplate>)
Line
Count
Source
262
34.9M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
34.9M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
34.9M
  }
v8::Local<v8::Name>::Local<v8::Symbol>(v8::Local<v8::Symbol>)
Line
Count
Source
262
90.4k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
90.4k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
90.4k
  }
v8::Local<v8::Data>::Local<v8::UnboundScript>(v8::Local<v8::UnboundScript>)
Line
Count
Source
262
1.13k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
1.13k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
1.13k
  }
Unexecuted instantiation: v8::Local<v8::Value>::Local<v8::Promise::Resolver>(v8::Local<v8::Promise::Resolver>)
v8::Local<v8::Value>::Local<v8::BigInt64Array>(v8::Local<v8::BigInt64Array>)
Line
Count
Source
262
269k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
269k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
269k
  }
v8::Local<v8::Data>::Local<v8::Integer>(v8::Local<v8::Integer>)
Line
Count
Source
262
224k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
224k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
224k
  }
v8::Local<v8::Data>::Local<v8::Symbol>(v8::Local<v8::Symbol>)
Line
Count
Source
262
134k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
134k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
134k
  }
Unexecuted instantiation: v8::Local<v8::Data>::Local<v8::Promise>(v8::Local<v8::Promise>)
Unexecuted instantiation: v8::Local<v8::Primitive>::Local<v8::String>(v8::Local<v8::String>)
v8::Local<v8::Value>::Local<v8::Map>(v8::Local<v8::Map>)
Line
Count
Source
262
269k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
269k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
269k
  }
Unexecuted instantiation: v8::Local<v8::Value>::Local<v8::SharedArrayBuffer>(v8::Local<v8::SharedArrayBuffer>)
Unexecuted instantiation: v8::Local<v8::Object>::Local<v8::Promise>(v8::Local<v8::Promise>)
v8::Local<v8::Data>::Local<v8::Private>(v8::Local<v8::Private>)
Line
Count
Source
262
1.88M
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
1.88M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
1.88M
  }
Unexecuted instantiation: v8::Local<v8::Value>::Local<v8::WasmMemoryObject>(v8::Local<v8::WasmMemoryObject>)
v8::Local<v8::Data>::Local<v8::Function>(v8::Local<v8::Function>)
Line
Count
Source
262
5.72k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
5.72k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
5.72k
  }
v8::Local<v8::Data>::Local<v8::Boolean>(v8::Local<v8::Boolean>)
Line
Count
Source
262
317k
  V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {
263
    /**
264
     * This check fails when trying to convert between incompatible
265
     * handles. For example, converting from a Local<String> to a
266
     * Local<Number>.
267
     */
268
317k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
317k
  }
Unexecuted instantiation: v8::Local<v8::Value>::Local<v8::ArrayBufferView>(v8::Local<v8::ArrayBufferView>)
Unexecuted instantiation: v8::Local<v8::Value>::Local<v8::BigInt>(v8::Local<v8::BigInt>)
Unexecuted instantiation: v8::Local<v8::Value>::Local<v8::External>(v8::Local<v8::External>)
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local<v8::Int8Array>(v8::Local<v8::Int8Array>)
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local<v8::Uint8Array>(v8::Local<v8::Uint8Array>)
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local<v8::Uint8ClampedArray>(v8::Local<v8::Uint8ClampedArray>)
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local<v8::Int16Array>(v8::Local<v8::Int16Array>)
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local<v8::Uint16Array>(v8::Local<v8::Uint16Array>)
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local<v8::Int32Array>(v8::Local<v8::Int32Array>)
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local<v8::Uint32Array>(v8::Local<v8::Uint32Array>)
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local<v8::Float32Array>(v8::Local<v8::Float32Array>)
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local<v8::Float64Array>(v8::Local<v8::Float64Array>)
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local<v8::BigInt64Array>(v8::Local<v8::BigInt64Array>)
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local<v8::BigUint64Array>(v8::Local<v8::BigUint64Array>)
Unexecuted instantiation: v8::Local<v8::Value>::Local<v8::TypedArray>(v8::Local<v8::TypedArray>)
Unexecuted instantiation: v8::Local<v8::Value>::Local<v8::DataView>(v8::Local<v8::DataView>)
270
271
834M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Value>::operator->() const
Line
Count
Source
271
142M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
Unexecuted instantiation: v8::Local<v8::Data>::operator->() const
v8::Local<v8::Context>::operator->() const
Line
Count
Source
271
184M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
Unexecuted instantiation: v8::Local<v8::Date>::operator->() const
v8::Local<v8::FunctionTemplate>::operator->() const
Line
Count
Source
271
55.5M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Template>::operator->() const
Line
Count
Source
271
22.7M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Function>::operator->() const
Line
Count
Source
271
22.0M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Object>::operator->() const
Line
Count
Source
271
306M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::ObjectTemplate>::operator->() const
Line
Count
Source
271
28.5M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Array>::operator->() const
Line
Count
Source
271
1.89M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Number>::operator->() const
Line
Count
Source
271
9
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Int32>::operator->() const
Line
Count
Source
271
127k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
Unexecuted instantiation: v8::Local<v8::Private>::operator->() const
v8::Local<v8::Symbol>::operator->() const
Line
Count
Source
271
2.42M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::String>::operator->() const
Line
Count
Source
271
34.1M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::ArrayBuffer>::operator->() const
Line
Count
Source
271
3.14M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Script>::operator->() const
Line
Count
Source
271
4.14k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
Unexecuted instantiation: v8::Local<v8::Promise>::operator->() const
v8::Local<v8::Uint32Array>::operator->() const
Line
Count
Source
271
5.72k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Uint8Array>::operator->() const
Line
Count
Source
271
272k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
Unexecuted instantiation: v8::Local<v8::Float64Array>::operator->() const
Unexecuted instantiation: v8::Local<v8::Int32Array>::operator->() const
v8::Local<v8::Uint32>::operator->() const
Line
Count
Source
271
1.39k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Name>::operator->() const
Line
Count
Source
271
1.26M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
Unexecuted instantiation: v8::Local<v8::Module>::operator->() const
v8::Local<v8::PrimitiveArray>::operator->() const
Line
Count
Source
271
288k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::ArrayBufferView>::operator->() const
Line
Count
Source
271
560k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
Unexecuted instantiation: v8::Local<v8::UnboundModuleScript>::operator->() const
Unexecuted instantiation: v8::Local<v8::FixedArray>::operator->() const
Unexecuted instantiation: v8::Local<v8::ModuleRequest>::operator->() const
v8::Local<v8::Boolean>::operator->() const
Line
Count
Source
271
134k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
Unexecuted instantiation: v8::Local<v8::Promise::Resolver>::operator->() const
Unexecuted instantiation: v8::Local<v8::SharedArrayBuffer>::operator->() const
v8::Local<v8::Integer>::operator->() const
Line
Count
Source
271
1.19k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
Unexecuted instantiation: v8::Local<v8::Set>::operator->() const
v8::Local<v8::UnboundScript>::operator->() const
Line
Count
Source
271
3.41k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Message>::operator->() const
Line
Count
Source
271
1.56M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
Unexecuted instantiation: v8::Local<v8::StackFrame>::operator->() const
Unexecuted instantiation: v8::Local<v8::StackTrace>::operator->() const
Unexecuted instantiation: v8::Local<v8::BigInt>::operator->() const
Unexecuted instantiation: v8::Local<v8::BigInt64Array>::operator->() const
Unexecuted instantiation: v8::Local<v8::WasmModuleObject>::operator->() const
v8::Local<v8::Map>::operator->() const
Line
Count
Source
271
26.5M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
Unexecuted instantiation: v8::Local<v8::Proxy>::operator->() const
Unexecuted instantiation: v8::Local<v8::External>::operator->() const
Unexecuted instantiation: v8::Local<v8::WasmMemoryObject>::operator->() const
Unexecuted instantiation: v8::Local<v8::TypedArray>::operator->() const
Unexecuted instantiation: v8::Local<v8::DataView>::operator->() const
272
273
69.9M
  V8_INLINE T* operator*() const { return this->operator->(); }
v8::Local<v8::Value>::operator*() const
Line
Count
Source
273
65.1M
  V8_INLINE T* operator*() const { return this->operator->(); }
Unexecuted instantiation: v8::Local<v8::Data>::operator*() const
v8::Local<v8::Array>::operator*() const
Line
Count
Source
273
134k
  V8_INLINE T* operator*() const { return this->operator->(); }
v8::Local<v8::Object>::operator*() const
Line
Count
Source
273
1.07M
  V8_INLINE T* operator*() const { return this->operator->(); }
v8::Local<v8::Function>::operator*() const
Line
Count
Source
273
3.35M
  V8_INLINE T* operator*() const { return this->operator->(); }
v8::Local<v8::Context>::operator*() const
Line
Count
Source
273
271k
  V8_INLINE T* operator*() const { return this->operator->(); }
Unexecuted instantiation: v8::Local<v8::Private>::operator*() const
Unexecuted instantiation: v8::Local<v8::Symbol>::operator*() const
Unexecuted instantiation: v8::Local<v8::String>::operator*() const
Unexecuted instantiation: v8::Local<v8::FunctionTemplate>::operator*() const
Unexecuted instantiation: v8::Local<v8::ObjectTemplate>::operator*() const
Unexecuted instantiation: v8::Local<v8::Uint32Array>::operator*() const
Unexecuted instantiation: v8::Local<v8::Uint8Array>::operator*() const
Unexecuted instantiation: v8::Local<v8::Float64Array>::operator*() const
Unexecuted instantiation: v8::Local<v8::Int32Array>::operator*() const
Unexecuted instantiation: v8::Local<v8::Promise>::operator*() const
Unexecuted instantiation: v8::Local<v8::ArrayBuffer>::operator*() const
v8::Local<v8::UnboundScript>::operator*() const
Line
Count
Source
273
1.13k
  V8_INLINE T* operator*() const { return this->operator->(); }
Unexecuted instantiation: v8::Local<v8::BigInt64Array>::operator*() const
Unexecuted instantiation: v8::Local<v8::WasmMemoryObject>::operator*() const
Unexecuted instantiation: v8::Local<v8::ArrayBufferView>::operator*() const
Unexecuted instantiation: v8::Local<v8::External>::operator*() const
Unexecuted instantiation: v8::Local<v8::Promise::Resolver>::operator*() const
274
275
  /**
276
   * Checks whether two handles are equal or different.
277
   * They are equal iff they are both empty or they are both non-empty and the
278
   * objects to which they refer are physically equal.
279
   *
280
   * If both handles refer to JS objects, this is the same as strict
281
   * non-equality. For primitives, such as numbers or strings, a `true` return
282
   * value does not indicate that the values aren't equal in the JavaScript
283
   * sense. Use `Value::StrictEquals()` to check primitives for equality.
284
   */
285
286
  template <class S>
287
382k
  V8_INLINE bool operator==(const Local<S>& that) const {
288
382k
    return internal::HandleHelper::EqualHandles(*this, that);
289
382k
  }
bool v8::Local<v8::Object>::operator==<v8::Object>(v8::Local<v8::Object> const&) const
Line
Count
Source
287
106k
  V8_INLINE bool operator==(const Local<S>& that) const {
288
106k
    return internal::HandleHelper::EqualHandles(*this, that);
289
106k
  }
bool v8::Local<v8::Context>::operator==<v8::Context>(v8::Local<v8::Context> const&) const
Line
Count
Source
287
271k
  V8_INLINE bool operator==(const Local<S>& that) const {
288
271k
    return internal::HandleHelper::EqualHandles(*this, that);
289
271k
  }
bool v8::Local<v8::Value>::operator==<v8::Object>(v8::Local<v8::Object> const&) const
Line
Count
Source
287
4.54k
  V8_INLINE bool operator==(const Local<S>& that) const {
288
4.54k
    return internal::HandleHelper::EqualHandles(*this, that);
289
4.54k
  }
Unexecuted instantiation: bool v8::Local<v8::SharedArrayBuffer>::operator==<v8::SharedArrayBuffer>(v8::Local<v8::SharedArrayBuffer> const&) const
Unexecuted instantiation: bool v8::Local<v8::ArrayBuffer>::operator==<v8::ArrayBuffer>(v8::Local<v8::ArrayBuffer> const&) const
Unexecuted instantiation: bool v8::Local<v8::Value>::operator==<v8::Symbol>(v8::Local<v8::Symbol> const&) const
Unexecuted instantiation: bool v8::Local<v8::Object>::operator==<v8::Value>(v8::Local<v8::Value> const&) const
290
291
  template <class S>
292
  V8_INLINE bool operator==(const PersistentBase<S>& that) const {
293
    return internal::HandleHelper::EqualHandles(*this, that);
294
  }
295
296
  template <class S>
297
241k
  V8_INLINE bool operator!=(const Local<S>& that) const {
298
241k
    return !operator==(that);
299
241k
  }
bool v8::Local<v8::Object>::operator!=<v8::Object>(v8::Local<v8::Object> const&) const
Line
Count
Source
297
106k
  V8_INLINE bool operator!=(const Local<S>& that) const {
298
106k
    return !operator==(that);
299
106k
  }
bool v8::Local<v8::Context>::operator!=<v8::Context>(v8::Local<v8::Context> const&) const
Line
Count
Source
297
134k
  V8_INLINE bool operator!=(const Local<S>& that) const {
298
134k
    return !operator==(that);
299
134k
  }
300
301
  template <class S>
302
  V8_INLINE bool operator!=(const Persistent<S>& that) const {
303
    return !operator==(that);
304
  }
305
306
  /**
307
   * Cast a handle to a subclass, e.g. Local<Value> to Local<Object>.
308
   * This is only valid if the handle actually refers to a value of the
309
   * target type.
310
   */
311
  template <class S>
312
25.7M
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
25.7M
    return Local<T>(LocalBase<T>(that));
320
25.7M
  }
v8::Local<v8::Number> v8::Local<v8::Number>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
9
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
9
    return Local<T>(LocalBase<T>(that));
320
9
  }
v8::Local<v8::Object> v8::Local<v8::Object>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
4.06M
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
4.06M
    return Local<T>(LocalBase<T>(that));
320
4.06M
  }
v8::Local<v8::Function> v8::Local<v8::Function>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
3.86M
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
3.86M
    return Local<T>(LocalBase<T>(that));
320
3.86M
  }
v8::Local<v8::Name> v8::Local<v8::Name>::Cast<v8::String>(v8::Local<v8::String>)
Line
Count
Source
312
869
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
869
    return Local<T>(LocalBase<T>(that));
320
869
  }
v8::Local<v8::Name> v8::Local<v8::Name>::Cast<v8::Symbol>(v8::Local<v8::Symbol>)
Line
Count
Source
312
4
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
4
    return Local<T>(LocalBase<T>(that));
320
4
  }
v8::Local<v8::Array> v8::Local<v8::Array>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
143k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
143k
    return Local<T>(LocalBase<T>(that));
320
143k
  }
v8::Local<v8::Int32> v8::Local<v8::Int32>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
127k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
127k
    return Local<T>(LocalBase<T>(that));
320
127k
  }
v8::Local<v8::String> v8::Local<v8::String>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
16.5M
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
16.5M
    return Local<T>(LocalBase<T>(that));
320
16.5M
  }
Unexecuted instantiation: v8::Local<v8::Promise> v8::Local<v8::Promise>::Cast<v8::Value>(v8::Local<v8::Value>)
v8::Local<v8::Uint32> v8::Local<v8::Uint32>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
1.39k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
1.39k
    return Local<T>(LocalBase<T>(that));
320
1.39k
  }
v8::Local<v8::Name> v8::Local<v8::Name>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
8.51k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
8.51k
    return Local<T>(LocalBase<T>(that));
320
8.51k
  }
Unexecuted instantiation: v8::Local<v8::Uint8Array> v8::Local<v8::Uint8Array>::Cast<v8::Value>(v8::Local<v8::Value>)
Unexecuted instantiation: v8::Local<v8::String> v8::Local<v8::String>::Cast<v8::Data>(v8::Local<v8::Data>)
Unexecuted instantiation: v8::Local<v8::FixedArray> v8::Local<v8::FixedArray>::Cast<v8::Data>(v8::Local<v8::Data>)
Unexecuted instantiation: v8::Local<v8::Symbol> v8::Local<v8::Symbol>::Cast<v8::Data>(v8::Local<v8::Data>)
v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Data>(v8::Local<v8::Data>)
Line
Count
Source
312
5.71k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
5.71k
    return Local<T>(LocalBase<T>(that));
320
5.71k
  }
v8::Local<v8::Symbol> v8::Local<v8::Symbol>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
2.27k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
2.27k
    return Local<T>(LocalBase<T>(that));
320
2.27k
  }
v8::Local<v8::ArrayBufferView> v8::Local<v8::ArrayBufferView>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
36.7k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
36.7k
    return Local<T>(LocalBase<T>(that));
320
36.7k
  }
Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Primitive>(v8::Local<v8::Primitive>)
Unexecuted instantiation: v8::Local<v8::ModuleRequest> v8::Local<v8::ModuleRequest>::Cast<v8::Data>(v8::Local<v8::Data>)
v8::Local<v8::Boolean> v8::Local<v8::Boolean>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
136k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
136k
    return Local<T>(LocalBase<T>(that));
320
136k
  }
v8::Local<v8::ArrayBuffer> v8::Local<v8::ArrayBuffer>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
9
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
9
    return Local<T>(LocalBase<T>(that));
320
9
  }
Unexecuted instantiation: v8::Local<v8::SharedArrayBuffer> v8::Local<v8::SharedArrayBuffer>::Cast<v8::Value>(v8::Local<v8::Value>)
v8::Local<v8::Integer> v8::Local<v8::Integer>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
1.19k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
1.19k
    return Local<T>(LocalBase<T>(that));
320
1.19k
  }
v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Object>(v8::Local<v8::Object>)
Line
Count
Source
312
11.4k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
11.4k
    return Local<T>(LocalBase<T>(that));
320
11.4k
  }
v8::Local<v8::ArrayBufferView> v8::Local<v8::ArrayBufferView>::Cast<v8::Object>(v8::Local<v8::Object>)
Line
Count
Source
312
163k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
163k
    return Local<T>(LocalBase<T>(that));
320
163k
  }
Unexecuted instantiation: v8::Local<v8::Promise::Resolver> v8::Local<v8::Promise::Resolver>::Cast<v8::Value>(v8::Local<v8::Value>)
v8::Local<v8::String> v8::Local<v8::String>::Cast<v8::Name>(v8::Local<v8::Name>)
Line
Count
Source
312
630k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
630k
    return Local<T>(LocalBase<T>(that));
320
630k
  }
Unexecuted instantiation: v8::Local<v8::BigInt> v8::Local<v8::BigInt>::Cast<v8::Value>(v8::Local<v8::Value>)
Unexecuted instantiation: v8::Local<v8::Promise::Resolver> v8::Local<v8::Promise::Resolver>::Cast<v8::Promise>(v8::Local<v8::Promise>)
Unexecuted instantiation: v8::Local<v8::Promise> v8::Local<v8::Promise>::Cast<v8::Promise::Resolver>(v8::Local<v8::Promise::Resolver>)
Unexecuted instantiation: v8::Local<v8::ArrayBuffer> v8::Local<v8::ArrayBuffer>::Cast<v8::Object>(v8::Local<v8::Object>)
Unexecuted instantiation: v8::Local<v8::Float64Array> v8::Local<v8::Float64Array>::Cast<v8::Value>(v8::Local<v8::Value>)
Unexecuted instantiation: v8::Local<v8::Function> v8::Local<v8::Function>::Cast<v8::Function>(v8::Local<v8::Function>)
Unexecuted instantiation: v8::Local<v8::Proxy> v8::Local<v8::Proxy>::Cast<v8::Value>(v8::Local<v8::Value>)
Unexecuted instantiation: v8::Local<v8::External> v8::Local<v8::External>::Cast<v8::Value>(v8::Local<v8::Value>)
Unexecuted instantiation: v8::Local<v8::WasmMemoryObject> v8::Local<v8::WasmMemoryObject>::Cast<v8::Value>(v8::Local<v8::Value>)
Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::String>(v8::Local<v8::String>)
v8::Local<v8::Uint32Array> v8::Local<v8::Uint32Array>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
5.72k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
5.72k
    return Local<T>(LocalBase<T>(that));
320
5.72k
  }
Unexecuted instantiation: v8::Local<v8::Array> v8::Local<v8::Array>::Cast<v8::Object>(v8::Local<v8::Object>)
Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::ArrayBuffer>(v8::Local<v8::ArrayBuffer>)
v8::Local<v8::Object> v8::Local<v8::Object>::Cast<v8::Object>(v8::Local<v8::Object>)
Line
Count
Source
312
1.33k
  V8_INLINE static Local<T> Cast(Local<S> that) {
313
#ifdef V8_ENABLE_CHECKS
314
    // If we're going to perform the type check then we have to check
315
    // that the handle isn't empty before doing the checked cast.
316
    if (that.IsEmpty()) return Local<T>();
317
    T::Cast(that.template value<S>());
318
#endif
319
1.33k
    return Local<T>(LocalBase<T>(that));
320
1.33k
  }
Unexecuted instantiation: v8::Local<v8::Map> v8::Local<v8::Map>::Cast<v8::Value>(v8::Local<v8::Value>)
Unexecuted instantiation: v8::Local<v8::TypedArray> v8::Local<v8::TypedArray>::Cast<v8::Value>(v8::Local<v8::Value>)
Unexecuted instantiation: v8::Local<v8::DataView> v8::Local<v8::DataView>::Cast<v8::Value>(v8::Local<v8::Value>)
Unexecuted instantiation: v8::Local<v8::Date> v8::Local<v8::Date>::Cast<v8::Value>(v8::Local<v8::Value>)
Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Array>(v8::Local<v8::Array>)
321
322
  /**
323
   * Calling this is equivalent to Local<S>::Cast().
324
   * In particular, this is only valid if the handle actually refers to a value
325
   * of the target type.
326
   */
327
  template <class S>
328
25.7M
  V8_INLINE Local<S> As() const {
329
25.7M
    return Local<S>::Cast(*this);
330
25.7M
  }
v8::Local<v8::Number> v8::Local<v8::Value>::As<v8::Number>() const
Line
Count
Source
328
9
  V8_INLINE Local<S> As() const {
329
9
    return Local<S>::Cast(*this);
330
9
  }
v8::Local<v8::Object> v8::Local<v8::Value>::As<v8::Object>() const
Line
Count
Source
328
4.06M
  V8_INLINE Local<S> As() const {
329
4.06M
    return Local<S>::Cast(*this);
330
4.06M
  }
v8::Local<v8::Function> v8::Local<v8::Value>::As<v8::Function>() const
Line
Count
Source
328
3.86M
  V8_INLINE Local<S> As() const {
329
3.86M
    return Local<S>::Cast(*this);
330
3.86M
  }
v8::Local<v8::Name> v8::Local<v8::String>::As<v8::Name>() const
Line
Count
Source
328
869
  V8_INLINE Local<S> As() const {
329
869
    return Local<S>::Cast(*this);
330
869
  }
v8::Local<v8::Name> v8::Local<v8::Symbol>::As<v8::Name>() const
Line
Count
Source
328
4
  V8_INLINE Local<S> As() const {
329
4
    return Local<S>::Cast(*this);
330
4
  }
v8::Local<v8::Array> v8::Local<v8::Value>::As<v8::Array>() const
Line
Count
Source
328
143k
  V8_INLINE Local<S> As() const {
329
143k
    return Local<S>::Cast(*this);
330
143k
  }
v8::Local<v8::Int32> v8::Local<v8::Value>::As<v8::Int32>() const
Line
Count
Source
328
127k
  V8_INLINE Local<S> As() const {
329
127k
    return Local<S>::Cast(*this);
330
127k
  }
v8::Local<v8::String> v8::Local<v8::Value>::As<v8::String>() const
Line
Count
Source
328
16.5M
  V8_INLINE Local<S> As() const {
329
16.5M
    return Local<S>::Cast(*this);
330
16.5M
  }
Unexecuted instantiation: v8::Local<v8::Promise> v8::Local<v8::Value>::As<v8::Promise>() const
v8::Local<v8::Uint32> v8::Local<v8::Value>::As<v8::Uint32>() const
Line
Count
Source
328
1.39k
  V8_INLINE Local<S> As() const {
329
1.39k
    return Local<S>::Cast(*this);
330
1.39k
  }
v8::Local<v8::Name> v8::Local<v8::Value>::As<v8::Name>() const
Line
Count
Source
328
8.51k
  V8_INLINE Local<S> As() const {
329
8.51k
    return Local<S>::Cast(*this);
330
8.51k
  }
Unexecuted instantiation: v8::Local<v8::Uint8Array> v8::Local<v8::Value>::As<v8::Uint8Array>() const
Unexecuted instantiation: v8::Local<v8::String> v8::Local<v8::Data>::As<v8::String>() const
Unexecuted instantiation: v8::Local<v8::FixedArray> v8::Local<v8::Data>::As<v8::FixedArray>() const
Unexecuted instantiation: v8::Local<v8::Symbol> v8::Local<v8::Data>::As<v8::Symbol>() const
v8::Local<v8::Value> v8::Local<v8::Data>::As<v8::Value>() const
Line
Count
Source
328
5.71k
  V8_INLINE Local<S> As() const {
329
5.71k
    return Local<S>::Cast(*this);
330
5.71k
  }
v8::Local<v8::Symbol> v8::Local<v8::Value>::As<v8::Symbol>() const
Line
Count
Source
328
2.27k
  V8_INLINE Local<S> As() const {
329
2.27k
    return Local<S>::Cast(*this);
330
2.27k
  }
v8::Local<v8::ArrayBufferView> v8::Local<v8::Value>::As<v8::ArrayBufferView>() const
Line
Count
Source
328
36.7k
  V8_INLINE Local<S> As() const {
329
36.7k
    return Local<S>::Cast(*this);
330
36.7k
  }
Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Primitive>::As<v8::Value>() const
Unexecuted instantiation: v8::Local<v8::ModuleRequest> v8::Local<v8::Data>::As<v8::ModuleRequest>() const
v8::Local<v8::Boolean> v8::Local<v8::Value>::As<v8::Boolean>() const
Line
Count
Source
328
136k
  V8_INLINE Local<S> As() const {
329
136k
    return Local<S>::Cast(*this);
330
136k
  }
v8::Local<v8::ArrayBuffer> v8::Local<v8::Value>::As<v8::ArrayBuffer>() const
Line
Count
Source
328
9
  V8_INLINE Local<S> As() const {
329
9
    return Local<S>::Cast(*this);
330
9
  }
Unexecuted instantiation: v8::Local<v8::SharedArrayBuffer> v8::Local<v8::Value>::As<v8::SharedArrayBuffer>() const
v8::Local<v8::Integer> v8::Local<v8::Value>::As<v8::Integer>() const
Line
Count
Source
328
1.19k
  V8_INLINE Local<S> As() const {
329
1.19k
    return Local<S>::Cast(*this);
330
1.19k
  }
v8::Local<v8::Value> v8::Local<v8::Object>::As<v8::Value>() const
Line
Count
Source
328
11.4k
  V8_INLINE Local<S> As() const {
329
11.4k
    return Local<S>::Cast(*this);
330
11.4k
  }
v8::Local<v8::ArrayBufferView> v8::Local<v8::Object>::As<v8::ArrayBufferView>() const
Line
Count
Source
328
163k
  V8_INLINE Local<S> As() const {
329
163k
    return Local<S>::Cast(*this);
330
163k
  }
Unexecuted instantiation: v8::Local<v8::Promise::Resolver> v8::Local<v8::Value>::As<v8::Promise::Resolver>() const
v8::Local<v8::String> v8::Local<v8::Name>::As<v8::String>() const
Line
Count
Source
328
630k
  V8_INLINE Local<S> As() const {
329
630k
    return Local<S>::Cast(*this);
330
630k
  }
Unexecuted instantiation: v8::Local<v8::BigInt> v8::Local<v8::Value>::As<v8::BigInt>() const
Unexecuted instantiation: v8::Local<v8::Promise::Resolver> v8::Local<v8::Promise>::As<v8::Promise::Resolver>() const
Unexecuted instantiation: v8::Local<v8::Promise> v8::Local<v8::Promise::Resolver>::As<v8::Promise>() const
Unexecuted instantiation: v8::Local<v8::ArrayBuffer> v8::Local<v8::Object>::As<v8::ArrayBuffer>() const
Unexecuted instantiation: v8::Local<v8::Float64Array> v8::Local<v8::Value>::As<v8::Float64Array>() const
Unexecuted instantiation: v8::Local<v8::Function> v8::Local<v8::Function>::As<v8::Function>() const
Unexecuted instantiation: v8::Local<v8::Proxy> v8::Local<v8::Value>::As<v8::Proxy>() const
Unexecuted instantiation: v8::Local<v8::External> v8::Local<v8::Value>::As<v8::External>() const
Unexecuted instantiation: v8::Local<v8::WasmMemoryObject> v8::Local<v8::Value>::As<v8::WasmMemoryObject>() const
Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::String>::As<v8::Value>() const
v8::Local<v8::Uint32Array> v8::Local<v8::Value>::As<v8::Uint32Array>() const
Line
Count
Source
328
5.72k
  V8_INLINE Local<S> As() const {
329
5.72k
    return Local<S>::Cast(*this);
330
5.72k
  }
Unexecuted instantiation: v8::Local<v8::Array> v8::Local<v8::Object>::As<v8::Array>() const
Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::ArrayBuffer>::As<v8::Value>() const
v8::Local<v8::Object> v8::Local<v8::Object>::As<v8::Object>() const
Line
Count
Source
328
1.33k
  V8_INLINE Local<S> As() const {
329
1.33k
    return Local<S>::Cast(*this);
330
1.33k
  }
Unexecuted instantiation: v8::Local<v8::Map> v8::Local<v8::Value>::As<v8::Map>() const
Unexecuted instantiation: v8::Local<v8::TypedArray> v8::Local<v8::Value>::As<v8::TypedArray>() const
Unexecuted instantiation: v8::Local<v8::DataView> v8::Local<v8::Value>::As<v8::DataView>() const
Unexecuted instantiation: v8::Local<v8::Date> v8::Local<v8::Value>::As<v8::Date>() const
Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Array>::As<v8::Value>() const
331
332
  /**
333
   * Create a local handle for the content of another handle.
334
   * The referee is kept alive by the local handle even when
335
   * the original handle is destroyed/disposed.
336
   */
337
  V8_INLINE static Local<T> New(Isolate* isolate, Local<T> that) {
338
    return New(isolate, that.template value<T, true>());
339
  }
340
341
  V8_INLINE static Local<T> New(Isolate* isolate,
342
4.03M
                                const PersistentBase<T>& that) {
343
4.03M
    return New(isolate, that.template value<T, true>());
344
4.03M
  }
Unexecuted instantiation: v8::Local<v8::Int8Array>::New(v8::Isolate*, v8::PersistentBase<v8::Int8Array> const&)
v8::Local<v8::Uint8Array>::New(v8::Isolate*, v8::PersistentBase<v8::Uint8Array> const&)
Line
Count
Source
342
538k
                                const PersistentBase<T>& that) {
343
538k
    return New(isolate, that.template value<T, true>());
344
538k
  }
Unexecuted instantiation: v8::Local<v8::Int16Array>::New(v8::Isolate*, v8::PersistentBase<v8::Int16Array> const&)
Unexecuted instantiation: v8::Local<v8::Uint16Array>::New(v8::Isolate*, v8::PersistentBase<v8::Uint16Array> const&)
v8::Local<v8::Int32Array>::New(v8::Isolate*, v8::PersistentBase<v8::Int32Array> const&)
Line
Count
Source
342
359k
                                const PersistentBase<T>& that) {
343
359k
    return New(isolate, that.template value<T, true>());
344
359k
  }
v8::Local<v8::Uint32Array>::New(v8::Isolate*, v8::PersistentBase<v8::Uint32Array> const&)
Line
Count
Source
342
942k
                                const PersistentBase<T>& that) {
343
942k
    return New(isolate, that.template value<T, true>());
344
942k
  }
Unexecuted instantiation: v8::Local<v8::Float32Array>::New(v8::Isolate*, v8::PersistentBase<v8::Float32Array> const&)
v8::Local<v8::Float64Array>::New(v8::Isolate*, v8::PersistentBase<v8::Float64Array> const&)
Line
Count
Source
342
672k
                                const PersistentBase<T>& that) {
343
672k
    return New(isolate, that.template value<T, true>());
344
672k
  }
v8::Local<v8::BigInt64Array>::New(v8::Isolate*, v8::PersistentBase<v8::BigInt64Array> const&)
Line
Count
Source
342
269k
                                const PersistentBase<T>& that) {
343
269k
    return New(isolate, that.template value<T, true>());
344
269k
  }
v8::Local<v8::Object>::New(v8::Isolate*, v8::PersistentBase<v8::Object> const&)
Line
Count
Source
342
1.10M
                                const PersistentBase<T>& that) {
343
1.10M
    return New(isolate, that.template value<T, true>());
344
1.10M
  }
v8::Local<v8::Context>::New(v8::Isolate*, v8::PersistentBase<v8::Context> const&)
Line
Count
Source
342
152k
                                const PersistentBase<T>& that) {
343
152k
    return New(isolate, that.template value<T, true>());
344
152k
  }
Unexecuted instantiation: v8::Local<v8::Array>::New(v8::Isolate*, v8::PersistentBase<v8::Array> const&)
v8::Local<v8::Function>::New(v8::Isolate*, v8::PersistentBase<v8::Function> const&)
Line
Count
Source
342
2
                                const PersistentBase<T>& that) {
343
2
    return New(isolate, that.template value<T, true>());
344
2
  }
Unexecuted instantiation: v8::Local<v8::Promise>::New(v8::Isolate*, v8::PersistentBase<v8::Promise> const&)
Unexecuted instantiation: v8::Local<v8::Module>::New(v8::Isolate*, v8::PersistentBase<v8::Module> const&)
v8::Local<v8::Value>::New(v8::Isolate*, v8::PersistentBase<v8::Value> const&)
Line
Count
Source
342
2
                                const PersistentBase<T>& that) {
343
2
    return New(isolate, that.template value<T, true>());
344
2
  }
Unexecuted instantiation: v8::Local<v8::ArrayBuffer>::New(v8::Isolate*, v8::PersistentBase<v8::ArrayBuffer> const&)
v8::Local<v8::UnboundScript>::New(v8::Isolate*, v8::PersistentBase<v8::UnboundScript> const&)
Line
Count
Source
342
1.13k
                                const PersistentBase<T>& that) {
343
1.13k
    return New(isolate, that.template value<T, true>());
344
1.13k
  }
Unexecuted instantiation: v8::Local<v8::WasmMemoryObject>::New(v8::Isolate*, v8::PersistentBase<v8::WasmMemoryObject> const&)
Unexecuted instantiation: v8::Local<v8::ArrayBufferView>::New(v8::Isolate*, v8::PersistentBase<v8::ArrayBufferView> const&)
Unexecuted instantiation: v8::Local<v8::FunctionTemplate>::New(v8::Isolate*, v8::PersistentBase<v8::FunctionTemplate> const&)
345
346
  V8_INLINE static Local<T> New(Isolate* isolate,
347
                                const BasicTracedReference<T>& that) {
348
    return New(isolate, that.template value<T, true>());
349
  }
350
351
 private:
352
  friend class TracedReferenceBase;
353
  friend class Utils;
354
  template <class F>
355
  friend class Eternal;
356
  template <class F>
357
  friend class Global;
358
  template <class F>
359
  friend class Local;
360
  template <class F>
361
  friend class MaybeLocal;
362
  template <class F, class M>
363
  friend class Persistent;
364
  template <class F>
365
  friend class FunctionCallbackInfo;
366
  template <class F>
367
  friend class PropertyCallbackInfo;
368
  friend class String;
369
  friend class Object;
370
  friend class Context;
371
  friend class Isolate;
372
  friend class Private;
373
  template <class F>
374
  friend class internal::CustomArguments;
375
  friend Local<Primitive> Undefined(Isolate* isolate);
376
  friend Local<Primitive> Null(Isolate* isolate);
377
  friend Local<Boolean> True(Isolate* isolate);
378
  friend Local<Boolean> False(Isolate* isolate);
379
  friend class HandleScope;
380
  friend class EscapableHandleScope;
381
  friend class InternalEscapableScope;
382
  template <class F1, class F2, class F3>
383
  friend class PersistentValueMapBase;
384
  template <class F1, class F2>
385
  friend class PersistentValueVector;
386
  template <class F>
387
  friend class ReturnValue;
388
  template <class F>
389
  friend class Traced;
390
  friend class internal::SamplingHeapProfiler;
391
  friend class internal::HandleHelper;
392
  friend class debug::ConsoleCallArguments;
393
  friend class internal::LocalUnchecked<T>;
394
395
  explicit Local(no_checking_tag do_not_check)
396
      : LocalBase<T>(), StackAllocated(do_not_check) {}
397
  explicit Local(const Local<T>& other, no_checking_tag do_not_check)
398
      : LocalBase<T>(other), StackAllocated(do_not_check) {}
399
400
  V8_INLINE explicit Local<T>(const LocalBase<T>& other)
401
351M
      : LocalBase<T>(other) {}
v8::Local<v8::Value>::Local(v8::LocalBase<v8::Value> const&)
Line
Count
Source
401
107M
      : LocalBase<T>(other) {}
v8::Local<v8::Primitive>::Local(v8::LocalBase<v8::Primitive> const&)
Line
Count
Source
401
12.4M
      : LocalBase<T>(other) {}
v8::Local<v8::Boolean>::Local(v8::LocalBase<v8::Boolean> const&)
Line
Count
Source
401
39.5M
      : LocalBase<T>(other) {}
v8::Local<v8::Object>::Local(v8::LocalBase<v8::Object> const&)
Line
Count
Source
401
11.5M
      : LocalBase<T>(other) {}
v8::Local<v8::String>::Local(v8::LocalBase<v8::String> const&)
Line
Count
Source
401
139M
      : LocalBase<T>(other) {}
v8::Local<v8::Symbol>::Local(v8::LocalBase<v8::Symbol> const&)
Line
Count
Source
401
5.29M
      : LocalBase<T>(other) {}
v8::Local<v8::FunctionTemplate>::Local(v8::LocalBase<v8::FunctionTemplate> const&)
Line
Count
Source
401
2.91M
      : LocalBase<T>(other) {}
v8::Local<v8::Number>::Local(v8::LocalBase<v8::Number> const&)
Line
Count
Source
401
9
      : LocalBase<T>(other) {}
v8::Local<v8::Function>::Local(v8::LocalBase<v8::Function> const&)
Line
Count
Source
401
16.3M
      : LocalBase<T>(other) {}
v8::Local<v8::Uint32Array>::Local(v8::LocalBase<v8::Uint32Array> const&)
Line
Count
Source
401
947k
      : LocalBase<T>(other) {}
v8::Local<v8::Float64Array>::Local(v8::LocalBase<v8::Float64Array> const&)
Line
Count
Source
401
672k
      : LocalBase<T>(other) {}
v8::Local<v8::Array>::Local(v8::LocalBase<v8::Array> const&)
Line
Count
Source
401
5.53M
      : LocalBase<T>(other) {}
v8::Local<v8::Name>::Local(v8::LocalBase<v8::Name> const&)
Line
Count
Source
401
9.38k
      : LocalBase<T>(other) {}
v8::Local<v8::Int32>::Local(v8::LocalBase<v8::Int32> const&)
Line
Count
Source
401
127k
      : LocalBase<T>(other) {}
v8::Local<v8::ObjectTemplate>::Local(v8::LocalBase<v8::ObjectTemplate> const&)
Line
Count
Source
401
4.96M
      : LocalBase<T>(other) {}
v8::Local<v8::Int32Array>::Local(v8::LocalBase<v8::Int32Array> const&)
Line
Count
Source
401
359k
      : LocalBase<T>(other) {}
v8::Local<v8::Uint8Array>::Local(v8::LocalBase<v8::Uint8Array> const&)
Line
Count
Source
401
538k
      : LocalBase<T>(other) {}
v8::Local<v8::Private>::Local(v8::LocalBase<v8::Private> const&)
Line
Count
Source
401
3.33M
      : LocalBase<T>(other) {}
v8::Local<v8::Context>::Local(v8::LocalBase<v8::Context> const&)
Line
Count
Source
401
153k
      : LocalBase<T>(other) {}
Unexecuted instantiation: v8::Local<v8::Promise>::Local(v8::LocalBase<v8::Promise> const&)
v8::Local<v8::Uint32>::Local(v8::LocalBase<v8::Uint32> const&)
Line
Count
Source
401
1.39k
      : LocalBase<T>(other) {}
v8::Local<v8::Data>::Local(v8::LocalBase<v8::Data> const&)
Line
Count
Source
401
5.71k
      : LocalBase<T>(other) {}
Unexecuted instantiation: v8::Local<v8::FixedArray>::Local(v8::LocalBase<v8::FixedArray> const&)
Unexecuted instantiation: v8::Local<v8::Module>::Local(v8::LocalBase<v8::Module> const&)
v8::Local<v8::ArrayBufferView>::Local(v8::LocalBase<v8::ArrayBufferView> const&)
Line
Count
Source
401
200k
      : LocalBase<T>(other) {}
Unexecuted instantiation: v8::Local<v8::ModuleRequest>::Local(v8::LocalBase<v8::ModuleRequest> const&)
v8::Local<v8::ArrayBuffer>::Local(v8::LocalBase<v8::ArrayBuffer> const&)
Line
Count
Source
401
9
      : LocalBase<T>(other) {}
Unexecuted instantiation: v8::Local<v8::SharedArrayBuffer>::Local(v8::LocalBase<v8::SharedArrayBuffer> const&)
v8::Local<v8::Integer>::Local(v8::LocalBase<v8::Integer> const&)
Line
Count
Source
401
1.34k
      : LocalBase<T>(other) {}
v8::Local<v8::UnboundScript>::Local(v8::LocalBase<v8::UnboundScript> const&)
Line
Count
Source
401
1.13k
      : LocalBase<T>(other) {}
v8::Local<v8::BigInt64Array>::Local(v8::LocalBase<v8::BigInt64Array> const&)
Line
Count
Source
401
269k
      : LocalBase<T>(other) {}
Unexecuted instantiation: v8::Local<v8::Promise::Resolver>::Local(v8::LocalBase<v8::Promise::Resolver> const&)
Unexecuted instantiation: v8::Local<v8::StackTrace>::Local(v8::LocalBase<v8::StackTrace> const&)
Unexecuted instantiation: v8::Local<v8::BigInt>::Local(v8::LocalBase<v8::BigInt> const&)
v8::Local<v8::Map>::Local(v8::LocalBase<v8::Map> const&)
Line
Count
Source
401
134k
      : LocalBase<T>(other) {}
Unexecuted instantiation: v8::Local<v8::Proxy>::Local(v8::LocalBase<v8::Proxy> const&)
Unexecuted instantiation: v8::Local<v8::External>::Local(v8::LocalBase<v8::External> const&)
Unexecuted instantiation: v8::Local<v8::WasmMemoryObject>::Local(v8::LocalBase<v8::WasmMemoryObject> const&)
Unexecuted instantiation: v8::Local<v8::TypedArray>::Local(v8::LocalBase<v8::TypedArray> const&)
Unexecuted instantiation: v8::Local<v8::DataView>::Local(v8::LocalBase<v8::DataView> const&)
Unexecuted instantiation: v8::Local<v8::Date>::Local(v8::LocalBase<v8::Date> const&)
402
403
256M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
256M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
256M
  }
v8::Local<v8::String>::FromSlot(unsigned long*)
Line
Count
Source
403
121M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
121M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
121M
  }
v8::Local<v8::Primitive>::FromSlot(unsigned long*)
Line
Count
Source
403
12.4M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
12.4M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
12.4M
  }
v8::Local<v8::Boolean>::FromSlot(unsigned long*)
Line
Count
Source
403
39.3M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
39.3M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
39.3M
  }
v8::Local<v8::Value>::FromSlot(unsigned long*)
Line
Count
Source
403
42.0M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
42.0M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
42.0M
  }
v8::Local<v8::Private>::FromSlot(unsigned long*)
Line
Count
Source
403
3.33M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
3.33M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
3.33M
  }
v8::Local<v8::Symbol>::FromSlot(unsigned long*)
Line
Count
Source
403
5.29M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
5.29M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
5.29M
  }
v8::Local<v8::FunctionTemplate>::FromSlot(unsigned long*)
Line
Count
Source
403
2.91M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
2.91M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
2.91M
  }
v8::Local<v8::ObjectTemplate>::FromSlot(unsigned long*)
Line
Count
Source
403
4.96M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
4.96M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
4.96M
  }
v8::Local<v8::Object>::FromSlot(unsigned long*)
Line
Count
Source
403
6.35M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
6.35M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
6.35M
  }
v8::Local<v8::Array>::FromSlot(unsigned long*)
Line
Count
Source
403
5.38M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
5.38M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
5.38M
  }
Unexecuted instantiation: v8::Local<v8::Uint32Array>::FromSlot(unsigned long*)
Unexecuted instantiation: v8::Local<v8::Uint8Array>::FromSlot(unsigned long*)
Unexecuted instantiation: v8::Local<v8::Float64Array>::FromSlot(unsigned long*)
Unexecuted instantiation: v8::Local<v8::Int32Array>::FromSlot(unsigned long*)
Unexecuted instantiation: v8::Local<v8::Promise>::FromSlot(unsigned long*)
v8::Local<v8::Function>::FromSlot(unsigned long*)
Line
Count
Source
403
12.5M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
12.5M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
12.5M
  }
v8::Local<v8::Context>::FromSlot(unsigned long*)
Line
Count
Source
403
1.13k
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
1.13k
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
1.13k
  }
Unexecuted instantiation: v8::Local<v8::StackTrace>::FromSlot(unsigned long*)
Unexecuted instantiation: v8::Local<v8::BigInt64Array>::FromSlot(unsigned long*)
v8::Local<v8::Integer>::FromSlot(unsigned long*)
Line
Count
Source
403
151
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
151
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
151
  }
v8::Local<v8::Map>::FromSlot(unsigned long*)
Line
Count
Source
403
134k
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
134k
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
134k
  }
406
407
#ifdef V8_ENABLE_DIRECT_LOCAL
408
  V8_INLINE static Local<T> FromAddress(internal::Address ptr) {
409
    return Local<T>(LocalBase<T>(ptr));
410
  }
411
#endif  // V8_ENABLE_DIRECT_LOCAL
412
413
10.2k
  V8_INLINE static Local<T> New(Isolate* isolate, internal::Address value) {
414
10.2k
    return Local<T>(LocalBase<T>::New(isolate, value));
415
10.2k
  }
v8::Local<v8::Data>::New(v8::Isolate*, unsigned long)
Line
Count
Source
413
5.71k
  V8_INLINE static Local<T> New(Isolate* isolate, internal::Address value) {
414
5.71k
    return Local<T>(LocalBase<T>::New(isolate, value));
415
5.71k
  }
v8::Local<v8::Value>::New(v8::Isolate*, unsigned long)
Line
Count
Source
413
4.55k
  V8_INLINE static Local<T> New(Isolate* isolate, internal::Address value) {
414
4.55k
    return Local<T>(LocalBase<T>::New(isolate, value));
415
4.55k
  }
416
417
4.03M
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
4.03M
    return Local<T>(LocalBase<T>::New(isolate, that));
419
4.03M
  }
v8::Local<v8::Value>::New(v8::Isolate*, v8::Value*)
Line
Count
Source
417
2
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
2
    return Local<T>(LocalBase<T>::New(isolate, that));
419
2
  }
Unexecuted instantiation: v8::Local<v8::Int8Array>::New(v8::Isolate*, v8::Int8Array*)
v8::Local<v8::Uint8Array>::New(v8::Isolate*, v8::Uint8Array*)
Line
Count
Source
417
538k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
538k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
538k
  }
Unexecuted instantiation: v8::Local<v8::Int16Array>::New(v8::Isolate*, v8::Int16Array*)
Unexecuted instantiation: v8::Local<v8::Uint16Array>::New(v8::Isolate*, v8::Uint16Array*)
v8::Local<v8::Int32Array>::New(v8::Isolate*, v8::Int32Array*)
Line
Count
Source
417
359k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
359k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
359k
  }
v8::Local<v8::Uint32Array>::New(v8::Isolate*, v8::Uint32Array*)
Line
Count
Source
417
942k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
942k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
942k
  }
Unexecuted instantiation: v8::Local<v8::Float32Array>::New(v8::Isolate*, v8::Float32Array*)
v8::Local<v8::Float64Array>::New(v8::Isolate*, v8::Float64Array*)
Line
Count
Source
417
672k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
672k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
672k
  }
v8::Local<v8::BigInt64Array>::New(v8::Isolate*, v8::BigInt64Array*)
Line
Count
Source
417
269k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
269k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
269k
  }
v8::Local<v8::Object>::New(v8::Isolate*, v8::Object*)
Line
Count
Source
417
1.10M
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
1.10M
    return Local<T>(LocalBase<T>::New(isolate, that));
419
1.10M
  }
v8::Local<v8::Context>::New(v8::Isolate*, v8::Context*)
Line
Count
Source
417
152k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
152k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
152k
  }
Unexecuted instantiation: v8::Local<v8::Array>::New(v8::Isolate*, v8::Array*)
v8::Local<v8::Function>::New(v8::Isolate*, v8::Function*)
Line
Count
Source
417
2
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
2
    return Local<T>(LocalBase<T>::New(isolate, that));
419
2
  }
Unexecuted instantiation: v8::Local<v8::Promise>::New(v8::Isolate*, v8::Promise*)
Unexecuted instantiation: v8::Local<v8::Module>::New(v8::Isolate*, v8::Module*)
Unexecuted instantiation: v8::Local<v8::ArrayBuffer>::New(v8::Isolate*, v8::ArrayBuffer*)
v8::Local<v8::UnboundScript>::New(v8::Isolate*, v8::UnboundScript*)
Line
Count
Source
417
1.13k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
1.13k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
1.13k
  }
Unexecuted instantiation: v8::Local<v8::WasmMemoryObject>::New(v8::Isolate*, v8::WasmMemoryObject*)
Unexecuted instantiation: v8::Local<v8::ArrayBufferView>::New(v8::Isolate*, v8::ArrayBufferView*)
Unexecuted instantiation: v8::Local<v8::FunctionTemplate>::New(v8::Isolate*, v8::FunctionTemplate*)
420
421
  // Unsafe cast, should be avoided.
422
  template <class S>
423
64.9M
  V8_INLINE Local<S> UnsafeAs() const {
424
64.9M
    return Local<S>(LocalBase<S>(*this));
425
64.9M
  }
v8::Local<v8::Value> v8::Local<v8::FunctionTemplate>::UnsafeAs<v8::Value>() const
Line
Count
Source
423
1.23M
  V8_INLINE Local<S> UnsafeAs() const {
424
1.23M
    return Local<S>(LocalBase<S>(*this));
425
1.23M
  }
v8::Local<v8::Value> v8::Local<v8::ObjectTemplate>::UnsafeAs<v8::Value>() const
Line
Count
Source
423
4.08M
  V8_INLINE Local<S> UnsafeAs() const {
424
4.08M
    return Local<S>(LocalBase<S>(*this));
425
4.08M
  }
v8::Local<v8::Value> v8::Local<v8::Private>::UnsafeAs<v8::Value>() const
Line
Count
Source
423
10.0M
  V8_INLINE Local<S> UnsafeAs() const {
424
10.0M
    return Local<S>(LocalBase<S>(*this));
425
10.0M
  }
v8::Local<v8::Value> v8::Local<v8::Symbol>::UnsafeAs<v8::Value>() const
Line
Count
Source
423
2.42M
  V8_INLINE Local<S> UnsafeAs() const {
424
2.42M
    return Local<S>(LocalBase<S>(*this));
425
2.42M
  }
v8::Local<v8::Value> v8::Local<v8::String>::UnsafeAs<v8::Value>() const
Line
Count
Source
423
47.1M
  V8_INLINE Local<S> UnsafeAs() const {
424
47.1M
    return Local<S>(LocalBase<S>(*this));
425
47.1M
  }
426
};
427
428
namespace internal {
429
// A local variant that is suitable for off-stack allocation.
430
// Used internally by LocalVector<T>. Not to be used directly!
431
template <typename T>
432
class V8_TRIVIAL_ABI LocalUnchecked : public Local<T> {
433
 public:
434
  LocalUnchecked() : Local<T>(Local<T>::do_not_check) {}
435
436
#if defined(V8_ENABLE_LOCAL_OFF_STACK_CHECK) && V8_HAS_ATTRIBUTE_TRIVIAL_ABI
437
  // In this case, the check is also enforced in the copy constructor and we
438
  // need to suppress it.
439
  LocalUnchecked(const LocalUnchecked& other)
440
      : Local<T>(other, Local<T>::do_not_check) {}
441
  LocalUnchecked& operator=(const LocalUnchecked&) = default;
442
#endif
443
444
  // Implicit conversion from Local.
445
  LocalUnchecked(const Local<T>& other)  // NOLINT(runtime/explicit)
446
      : Local<T>(other, Local<T>::do_not_check) {}
447
};
448
449
#ifdef V8_ENABLE_DIRECT_LOCAL
450
// Off-stack allocated direct locals must be registered as strong roots.
451
// For off-stack indirect locals, this is not necessary.
452
453
template <typename T>
454
class StrongRootAllocator<LocalUnchecked<T>> : public StrongRootAllocatorBase {
455
 public:
456
  using value_type = LocalUnchecked<T>;
457
  static_assert(std::is_standard_layout_v<value_type>);
458
  static_assert(sizeof(value_type) == sizeof(Address));
459
460
  explicit StrongRootAllocator(Heap* heap) : StrongRootAllocatorBase(heap) {}
461
  explicit StrongRootAllocator(v8::Isolate* isolate)
462
      : StrongRootAllocatorBase(isolate) {}
463
  template <typename U>
464
  StrongRootAllocator(const StrongRootAllocator<U>& other) noexcept
465
      : StrongRootAllocatorBase(other) {}
466
467
  value_type* allocate(size_t n) {
468
    return reinterpret_cast<value_type*>(allocate_impl(n));
469
  }
470
  void deallocate(value_type* p, size_t n) noexcept {
471
    return deallocate_impl(reinterpret_cast<Address*>(p), n);
472
  }
473
};
474
#endif  // V8_ENABLE_DIRECT_LOCAL
475
}  // namespace internal
476
477
template <typename T>
478
class LocalVector {
479
 private:
480
  using element_type = internal::LocalUnchecked<T>;
481
482
#ifdef V8_ENABLE_DIRECT_LOCAL
483
  using allocator_type = internal::StrongRootAllocator<element_type>;
484
485
  static allocator_type make_allocator(Isolate* isolate) noexcept {
486
    return allocator_type(isolate);
487
  }
488
#else
489
  using allocator_type = std::allocator<element_type>;
490
491
  static allocator_type make_allocator(Isolate* isolate) noexcept {
492
    return allocator_type();
493
  }
494
#endif  // V8_ENABLE_DIRECT_LOCAL
495
496
  using vector_type = std::vector<element_type, allocator_type>;
497
498
 public:
499
  using value_type = Local<T>;
500
  using reference = value_type&;
501
  using const_reference = const value_type&;
502
  using size_type = size_t;
503
  using difference_type = ptrdiff_t;
504
  using iterator =
505
      internal::WrappedIterator<typename vector_type::iterator, Local<T>>;
506
  using const_iterator =
507
      internal::WrappedIterator<typename vector_type::const_iterator,
508
                                const Local<T>>;
509
510
  explicit LocalVector(Isolate* isolate) : backing_(make_allocator(isolate)) {}
511
  LocalVector(Isolate* isolate, size_t n)
512
      : backing_(n, make_allocator(isolate)) {}
513
  explicit LocalVector(Isolate* isolate, std::initializer_list<Local<T>> init)
514
      : backing_(make_allocator(isolate)) {
515
    if (init.size() == 0) return;
516
    backing_.reserve(init.size());
517
    backing_.insert(backing_.end(), init.begin(), init.end());
518
  }
519
520
0
  iterator begin() noexcept { return iterator(backing_.begin()); }
521
  const_iterator begin() const noexcept {
522
    return const_iterator(backing_.begin());
523
  }
524
0
  iterator end() noexcept { return iterator(backing_.end()); }
Unexecuted instantiation: v8::LocalVector<v8::Object>::end()
Unexecuted instantiation: v8::LocalVector<v8::Message>::end()
525
  const_iterator end() const noexcept { return const_iterator(backing_.end()); }
526
527
0
  size_t size() const noexcept { return backing_.size(); }
528
  bool empty() const noexcept { return backing_.empty(); }
529
  void reserve(size_t n) { backing_.reserve(n); }
530
  void shrink_to_fit() { backing_.shrink_to_fit(); }
531
532
  Local<T>& operator[](size_t n) { return backing_[n]; }
533
  const Local<T>& operator[](size_t n) const { return backing_[n]; }
534
535
  Local<T>& at(size_t n) { return backing_.at(n); }
536
  const Local<T>& at(size_t n) const { return backing_.at(n); }
537
538
  Local<T>& front() { return backing_.front(); }
539
  const Local<T>& front() const { return backing_.front(); }
540
  Local<T>& back() { return backing_.back(); }
541
  const Local<T>& back() const { return backing_.back(); }
542
543
  Local<T>* data() noexcept { return backing_.data(); }
544
  const Local<T>* data() const noexcept { return backing_.data(); }
545
546
  iterator insert(const_iterator pos, const Local<T>& value) {
547
    return iterator(backing_.insert(pos.base(), value));
548
  }
549
550
  template <typename InputIt>
551
0
  iterator insert(const_iterator pos, InputIt first, InputIt last) {
552
0
    return iterator(backing_.insert(pos.base(), first, last));
553
0
  }
554
555
  iterator insert(const_iterator pos, std::initializer_list<Local<T>> init) {
556
    return iterator(backing_.insert(pos.base(), init.begin(), init.end()));
557
  }
558
559
  LocalVector<T>& operator=(std::initializer_list<Local<T>> init) {
560
    backing_.clear();
561
    backing_.insert(backing_.end(), init.begin(), init.end());
562
    return *this;
563
  }
564
565
  void push_back(const Local<T>& x) { backing_.push_back(x); }
566
  void pop_back() { backing_.pop_back(); }
567
  void emplace_back(const Local<T>& x) { backing_.emplace_back(x); }
568
569
  void clear() noexcept { backing_.clear(); }
570
  void resize(size_t n) { backing_.resize(n); }
571
  void swap(LocalVector<T>& other) { backing_.swap(other.backing_); }
572
573
  friend bool operator==(const LocalVector<T>& x, const LocalVector<T>& y) {
574
    return x.backing_ == y.backing_;
575
  }
576
  friend bool operator!=(const LocalVector<T>& x, const LocalVector<T>& y) {
577
    return x.backing_ != y.backing_;
578
  }
579
  friend bool operator<(const LocalVector<T>& x, const LocalVector<T>& y) {
580
    return x.backing_ < y.backing_;
581
  }
582
  friend bool operator>(const LocalVector<T>& x, const LocalVector<T>& y) {
583
    return x.backing_ > y.backing_;
584
  }
585
  friend bool operator<=(const LocalVector<T>& x, const LocalVector<T>& y) {
586
    return x.backing_ <= y.backing_;
587
  }
588
  friend bool operator>=(const LocalVector<T>& x, const LocalVector<T>& y) {
589
    return x.backing_ >= y.backing_;
590
  }
591
592
 private:
593
  vector_type backing_;
594
};
595
596
#if !defined(V8_IMMINENT_DEPRECATION_WARNINGS)
597
// Handle is an alias for Local for historical reasons.
598
template <class T>
599
using Handle = Local<T>;
600
#endif
601
602
/**
603
 * A MaybeLocal<> is a wrapper around Local<> that enforces a check whether
604
 * the Local<> is empty before it can be used.
605
 *
606
 * If an API method returns a MaybeLocal<>, the API method can potentially fail
607
 * either because an exception is thrown, or because an exception is pending,
608
 * e.g. because a previous API call threw an exception that hasn't been caught
609
 * yet, or because a TerminateExecution exception was thrown. In that case, an
610
 * empty MaybeLocal is returned.
611
 */
612
template <class T>
613
class MaybeLocal {
614
 public:
615
999k
  V8_INLINE MaybeLocal() : local_() {}
v8::MaybeLocal<v8::Value>::MaybeLocal()
Line
Count
Source
615
367k
  V8_INLINE MaybeLocal() : local_() {}
v8::MaybeLocal<v8::Object>::MaybeLocal()
Line
Count
Source
615
12
  V8_INLINE MaybeLocal() : local_() {}
Unexecuted instantiation: v8::MaybeLocal<v8::Array>::MaybeLocal()
Unexecuted instantiation: v8::MaybeLocal<v8::Promise>::MaybeLocal()
Unexecuted instantiation: v8::MaybeLocal<v8::Module>::MaybeLocal()
Unexecuted instantiation: v8::MaybeLocal<v8::Uint8Array>::MaybeLocal()
Unexecuted instantiation: v8::MaybeLocal<v8::Function>::MaybeLocal()
Unexecuted instantiation: v8::MaybeLocal<v8::Context>::MaybeLocal()
v8::MaybeLocal<v8::String>::MaybeLocal()
Line
Count
Source
615
631k
  V8_INLINE MaybeLocal() : local_() {}
Unexecuted instantiation: v8::MaybeLocal<v8::StackTrace>::MaybeLocal()
Unexecuted instantiation: v8::MaybeLocal<v8::ObjectTemplate>::MaybeLocal()
Unexecuted instantiation: v8::MaybeLocal<v8::ArrayBufferView>::MaybeLocal()
616
  template <class S>
617
138M
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::Value>::MaybeLocal<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
617
1.61M
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::Value>::MaybeLocal<v8::String>(v8::Local<v8::String>)
Line
Count
Source
617
105M
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::Object>::MaybeLocal<v8::Object>(v8::Local<v8::Object>)
Line
Count
Source
617
676k
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::ObjectTemplate>::MaybeLocal<v8::ObjectTemplate>(v8::Local<v8::ObjectTemplate>)
Line
Count
Source
617
135k
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
Unexecuted instantiation: v8::MaybeLocal<v8::Value>::MaybeLocal<v8::Primitive>(v8::Local<v8::Primitive>)
Unexecuted instantiation: v8::MaybeLocal<v8::Private>::MaybeLocal<v8::Private>(v8::Local<v8::Private>)
Unexecuted instantiation: v8::MaybeLocal<v8::Symbol>::MaybeLocal<v8::Symbol>(v8::Local<v8::Symbol>)
v8::MaybeLocal<v8::String>::MaybeLocal<v8::String>(v8::Local<v8::String>)
Line
Count
Source
617
12.5M
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
Unexecuted instantiation: v8::MaybeLocal<v8::FunctionTemplate>::MaybeLocal<v8::FunctionTemplate>(v8::Local<v8::FunctionTemplate>)
Unexecuted instantiation: v8::MaybeLocal<v8::Uint32Array>::MaybeLocal<v8::Uint32Array>(v8::Local<v8::Uint32Array>)
v8::MaybeLocal<v8::Uint8Array>::MaybeLocal<v8::Uint8Array>(v8::Local<v8::Uint8Array>)
Line
Count
Source
617
3.75k
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
Unexecuted instantiation: v8::MaybeLocal<v8::Float64Array>::MaybeLocal<v8::Float64Array>(v8::Local<v8::Float64Array>)
Unexecuted instantiation: v8::MaybeLocal<v8::Array>::MaybeLocal<v8::Array>(v8::Local<v8::Array>)
Unexecuted instantiation: v8::MaybeLocal<v8::Int32Array>::MaybeLocal<v8::Int32Array>(v8::Local<v8::Int32Array>)
Unexecuted instantiation: v8::MaybeLocal<v8::Promise>::MaybeLocal<v8::Promise>(v8::Local<v8::Promise>)
Unexecuted instantiation: v8::MaybeLocal<v8::Module>::MaybeLocal<v8::Module>(v8::Local<v8::Module>)
Unexecuted instantiation: v8::MaybeLocal<v8::Value>::MaybeLocal<v8::Promise>(v8::Local<v8::Promise>)
v8::MaybeLocal<v8::Object>::MaybeLocal<v8::Uint8Array>(v8::Local<v8::Uint8Array>)
Line
Count
Source
617
10
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::Function>::MaybeLocal<v8::Function>(v8::Local<v8::Function>)
Line
Count
Source
617
12.6M
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
Unexecuted instantiation: v8::MaybeLocal<v8::Value>::MaybeLocal<v8::Set>(v8::Local<v8::Set>)
v8::MaybeLocal<v8::Value>::MaybeLocal<v8::Array>(v8::Local<v8::Array>)
Line
Count
Source
617
5.38M
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::Context>::MaybeLocal<v8::Context>(v8::Local<v8::Context>)
Line
Count
Source
617
1.13k
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
Unexecuted instantiation: v8::MaybeLocal<v8::Value>::MaybeLocal<v8::Integer>(v8::Local<v8::Integer>)
Unexecuted instantiation: v8::MaybeLocal<v8::StackTrace>::MaybeLocal<v8::StackTrace>(v8::Local<v8::StackTrace>)
Unexecuted instantiation: v8::MaybeLocal<v8::BigInt64Array>::MaybeLocal<v8::BigInt64Array>(v8::Local<v8::BigInt64Array>)
Unexecuted instantiation: v8::MaybeLocal<v8::SharedArrayBuffer>::MaybeLocal<v8::SharedArrayBuffer>(v8::Local<v8::SharedArrayBuffer>)
Unexecuted instantiation: v8::MaybeLocal<v8::Value>::MaybeLocal<v8::Symbol>(v8::Local<v8::Symbol>)
v8::MaybeLocal<v8::Value>::MaybeLocal<v8::Map>(v8::Local<v8::Map>)
Line
Count
Source
617
134k
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::Value>::MaybeLocal<v8::Boolean>(v8::Local<v8::Boolean>)
Line
Count
Source
617
134k
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::Value>::MaybeLocal<v8::Object>(v8::Local<v8::Object>)
Line
Count
Source
617
3
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
Unexecuted instantiation: v8::MaybeLocal<v8::ArrayBufferView>::MaybeLocal<v8::ArrayBufferView>(v8::Local<v8::ArrayBufferView>)
Unexecuted instantiation: v8::MaybeLocal<v8::Integer>::MaybeLocal<v8::Integer>(v8::Local<v8::Integer>)
Unexecuted instantiation: v8::MaybeLocal<v8::Boolean>::MaybeLocal<v8::Boolean>(v8::Local<v8::Boolean>)
618
619
663M
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
v8::MaybeLocal<v8::String>::IsEmpty() const
Line
Count
Source
619
467M
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
v8::MaybeLocal<v8::Value>::IsEmpty() const
Line
Count
Source
619
120M
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
v8::MaybeLocal<v8::Function>::IsEmpty() const
Line
Count
Source
619
43.5M
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
v8::MaybeLocal<v8::Object>::IsEmpty() const
Line
Count
Source
619
5.92M
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
v8::MaybeLocal<v8::Context>::IsEmpty() const
Line
Count
Source
619
9.09k
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
Unexecuted instantiation: v8::MaybeLocal<v8::Private>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::Symbol>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::FunctionTemplate>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::ObjectTemplate>::IsEmpty() const
v8::MaybeLocal<v8::Script>::IsEmpty() const
Line
Count
Source
619
11.5k
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
Unexecuted instantiation: v8::MaybeLocal<v8::Uint32Array>::IsEmpty() const
v8::MaybeLocal<v8::Uint8Array>::IsEmpty() const
Line
Count
Source
619
3.75k
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
Unexecuted instantiation: v8::MaybeLocal<v8::Float64Array>::IsEmpty() const
v8::MaybeLocal<v8::Array>::IsEmpty() const
Line
Count
Source
619
18.2k
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
Unexecuted instantiation: v8::MaybeLocal<v8::Int32Array>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::Module>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::Promise::Resolver>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::Set>::IsEmpty() const
v8::MaybeLocal<v8::UnboundScript>::IsEmpty() const
Line
Count
Source
619
1.13k
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
Unexecuted instantiation: v8::MaybeLocal<v8::StackTrace>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::Promise>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::BigInt64Array>::IsEmpty() const
v8::MaybeLocal<v8::Map>::IsEmpty() const
Line
Count
Source
619
26.3M
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
Unexecuted instantiation: v8::MaybeLocal<v8::ArrayBufferView>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::BigInt>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::Number>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::Integer>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::Boolean>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::Int32>::IsEmpty() const
Unexecuted instantiation: v8::MaybeLocal<v8::Uint32>::IsEmpty() const
620
621
  /**
622
   * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty,
623
   * |false| is returned and |out| is assigned with nullptr.
624
   */
625
  template <class S>
626
160M
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
160M
    *out = local_;
628
160M
    return !IsEmpty();
629
160M
  }
bool v8::MaybeLocal<v8::Value>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const
Line
Count
Source
626
88.2M
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
88.2M
    *out = local_;
628
88.2M
    return !IsEmpty();
629
88.2M
  }
bool v8::MaybeLocal<v8::Function>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const
Line
Count
Source
626
279k
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
279k
    *out = local_;
628
279k
    return !IsEmpty();
629
279k
  }
bool v8::MaybeLocal<v8::Object>::ToLocal<v8::Object>(v8::Local<v8::Object>*) const
Line
Count
Source
626
689k
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
689k
    *out = local_;
628
689k
    return !IsEmpty();
629
689k
  }
Unexecuted instantiation: bool v8::MaybeLocal<v8::Private>::ToLocal<v8::Private>(v8::Local<v8::Private>*) const
Unexecuted instantiation: bool v8::MaybeLocal<v8::Symbol>::ToLocal<v8::Symbol>(v8::Local<v8::Symbol>*) const
bool v8::MaybeLocal<v8::String>::ToLocal<v8::String>(v8::Local<v8::String>*) const
Line
Count
Source
626
46.2M
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
46.2M
    *out = local_;
628
46.2M
    return !IsEmpty();
629
46.2M
  }
Unexecuted instantiation: bool v8::MaybeLocal<v8::FunctionTemplate>::ToLocal<v8::FunctionTemplate>(v8::Local<v8::FunctionTemplate>*) const
Unexecuted instantiation: bool v8::MaybeLocal<v8::ObjectTemplate>::ToLocal<v8::ObjectTemplate>(v8::Local<v8::ObjectTemplate>*) const
Unexecuted instantiation: bool v8::MaybeLocal<v8::Script>::ToLocal<v8::Script>(v8::Local<v8::Script>*) const
Unexecuted instantiation: bool v8::MaybeLocal<v8::String>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const
bool v8::MaybeLocal<v8::Array>::ToLocal<v8::Array>(v8::Local<v8::Array>*) const
Line
Count
Source
626
1.20k
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
1.20k
    *out = local_;
628
1.20k
    return !IsEmpty();
629
1.20k
  }
Unexecuted instantiation: bool v8::MaybeLocal<v8::Module>::ToLocal<v8::Module>(v8::Local<v8::Module>*) const
Unexecuted instantiation: bool v8::MaybeLocal<v8::Promise::Resolver>::ToLocal<v8::Promise::Resolver>(v8::Local<v8::Promise::Resolver>*) const
bool v8::MaybeLocal<v8::Function>::ToLocal<v8::Function>(v8::Local<v8::Function>*) const
Line
Count
Source
626
25.3M
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
25.3M
    *out = local_;
628
25.3M
    return !IsEmpty();
629
25.3M
  }
bool v8::MaybeLocal<v8::Uint8Array>::ToLocal<v8::Object>(v8::Local<v8::Object>*) const
Line
Count
Source
626
3.70k
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
3.70k
    *out = local_;
628
3.70k
    return !IsEmpty();
629
3.70k
  }
Unexecuted instantiation: bool v8::MaybeLocal<v8::Uint8Array>::ToLocal<v8::Uint8Array>(v8::Local<v8::Uint8Array>*) const
bool v8::MaybeLocal<v8::Context>::ToLocal<v8::Context>(v8::Local<v8::Context>*) const
Line
Count
Source
626
9.09k
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
9.09k
    *out = local_;
628
9.09k
    return !IsEmpty();
629
9.09k
  }
bool v8::MaybeLocal<v8::UnboundScript>::ToLocal<v8::UnboundScript>(v8::Local<v8::UnboundScript>*) const
Line
Count
Source
626
1.13k
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
1.13k
    *out = local_;
628
1.13k
    return !IsEmpty();
629
1.13k
  }
Unexecuted instantiation: bool v8::MaybeLocal<v8::StackTrace>::ToLocal<v8::StackTrace>(v8::Local<v8::StackTrace>*) const
Unexecuted instantiation: bool v8::MaybeLocal<v8::Promise>::ToLocal<v8::Promise>(v8::Local<v8::Promise>*) const
bool v8::MaybeLocal<v8::Object>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const
Line
Count
Source
626
12
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
12
    *out = local_;
628
12
    return !IsEmpty();
629
12
  }
bool v8::MaybeLocal<v8::Uint8Array>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const
Line
Count
Source
626
10
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
10
    *out = local_;
628
10
    return !IsEmpty();
629
10
  }
Unexecuted instantiation: bool v8::MaybeLocal<v8::Integer>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const
Unexecuted instantiation: bool v8::MaybeLocal<v8::Boolean>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const
Unexecuted instantiation: bool v8::MaybeLocal<v8::Int32>::ToLocal<v8::Int32>(v8::Local<v8::Int32>*) const
Unexecuted instantiation: bool v8::MaybeLocal<v8::Uint32>::ToLocal<v8::Uint32>(v8::Local<v8::Uint32>*) const
630
631
  /**
632
   * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty,
633
   * V8 will crash the process.
634
   */
635
366M
  V8_INLINE Local<T> ToLocalChecked() {
636
366M
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
366M
    return local_;
638
366M
  }
v8::MaybeLocal<v8::String>::ToLocalChecked()
Line
Count
Source
635
315M
  V8_INLINE Local<T> ToLocalChecked() {
636
315M
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
315M
    return local_;
638
315M
  }
v8::MaybeLocal<v8::Value>::ToLocalChecked()
Line
Count
Source
635
27.7M
  V8_INLINE Local<T> ToLocalChecked() {
636
27.7M
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
27.7M
    return local_;
638
27.7M
  }
v8::MaybeLocal<v8::Function>::ToLocalChecked()
Line
Count
Source
635
17.8M
  V8_INLINE Local<T> ToLocalChecked() {
636
17.8M
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
17.8M
    return local_;
638
17.8M
  }
v8::MaybeLocal<v8::Object>::ToLocalChecked()
Line
Count
Source
635
5.03M
  V8_INLINE Local<T> ToLocalChecked() {
636
5.03M
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
5.03M
    return local_;
638
5.03M
  }
Unexecuted instantiation: v8::MaybeLocal<v8::Context>::ToLocalChecked()
Unexecuted instantiation: v8::MaybeLocal<v8::Uint32Array>::ToLocalChecked()
Unexecuted instantiation: v8::MaybeLocal<v8::Uint8Array>::ToLocalChecked()
Unexecuted instantiation: v8::MaybeLocal<v8::Float64Array>::ToLocalChecked()
v8::MaybeLocal<v8::Array>::ToLocalChecked()
Line
Count
Source
635
8.51k
  V8_INLINE Local<T> ToLocalChecked() {
636
8.51k
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
8.51k
    return local_;
638
8.51k
  }
Unexecuted instantiation: v8::MaybeLocal<v8::Int32Array>::ToLocalChecked()
Unexecuted instantiation: v8::MaybeLocal<v8::Promise::Resolver>::ToLocalChecked()
Unexecuted instantiation: v8::MaybeLocal<v8::BigInt64Array>::ToLocalChecked()
Unexecuted instantiation: v8::MaybeLocal<v8::BigInt>::ToLocalChecked()
Unexecuted instantiation: v8::MaybeLocal<v8::Number>::ToLocalChecked()
v8::MaybeLocal<v8::Script>::ToLocalChecked()
Line
Count
Source
635
3.01k
  V8_INLINE Local<T> ToLocalChecked() {
636
3.01k
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
3.01k
    return local_;
638
3.01k
  }
639
640
  /**
641
   * Converts this MaybeLocal<> to a Local<>, using a default value if this
642
   * MaybeLocal<> is empty.
643
   */
644
  template <class S>
645
106M
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
106M
    return IsEmpty() ? default_value : Local<S>(local_);
647
106M
  }
v8::Local<v8::String> v8::MaybeLocal<v8::String>::FromMaybe<v8::String>(v8::Local<v8::String>) const
Line
Count
Source
645
105M
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
105M
    return IsEmpty() ? default_value : Local<S>(local_);
647
105M
  }
v8::Local<v8::Value> v8::MaybeLocal<v8::String>::FromMaybe<v8::Value>(v8::Local<v8::Value>) const
Line
Count
Source
645
4
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
4
    return IsEmpty() ? default_value : Local<S>(local_);
647
4
  }
v8::Local<v8::Value> v8::MaybeLocal<v8::Value>::FromMaybe<v8::Value>(v8::Local<v8::Value>) const
Line
Count
Source
645
1.21M
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
1.21M
    return IsEmpty() ? default_value : Local<S>(local_);
647
1.21M
  }
v8::Local<v8::Object> v8::MaybeLocal<v8::Object>::FromMaybe<v8::Object>(v8::Local<v8::Object>) const
Line
Count
Source
645
134k
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
134k
    return IsEmpty() ? default_value : Local<S>(local_);
647
134k
  }
v8::Local<v8::Uint8Array> v8::MaybeLocal<v8::Uint8Array>::FromMaybe<v8::Uint8Array>(v8::Local<v8::Uint8Array>) const
Line
Count
Source
645
10
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
10
    return IsEmpty() ? default_value : Local<S>(local_);
647
10
  }
v8::Local<v8::Value> v8::MaybeLocal<v8::Uint8Array>::FromMaybe<v8::Value>(v8::Local<v8::Value>) const
Line
Count
Source
645
17
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
17
    return IsEmpty() ? default_value : Local<S>(local_);
647
17
  }
v8::Local<v8::Value> v8::MaybeLocal<v8::Object>::FromMaybe<v8::Value>(v8::Local<v8::Value>) const
Line
Count
Source
645
3
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
3
    return IsEmpty() ? default_value : Local<S>(local_);
647
3
  }
Unexecuted instantiation: v8::Local<v8::ArrayBufferView> v8::MaybeLocal<v8::ArrayBufferView>::FromMaybe<v8::ArrayBufferView>(v8::Local<v8::ArrayBufferView>) const
v8::Local<v8::Object> v8::MaybeLocal<v8::Uint8Array>::FromMaybe<v8::Object>(v8::Local<v8::Object>) const
Line
Count
Source
645
9
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
9
    return IsEmpty() ? default_value : Local<S>(local_);
647
9
  }
648
649
  /**
650
   * Cast a handle to a subclass, e.g. MaybeLocal<Value> to MaybeLocal<Object>.
651
   * This is only valid if the handle actually refers to a value of the target
652
   * type.
653
   */
654
  template <class S>
655
  V8_INLINE static MaybeLocal<T> Cast(MaybeLocal<S> that) {
656
#ifdef V8_ENABLE_CHECKS
657
    // If we're going to perform the type check then we have to check
658
    // that the handle isn't empty before doing the checked cast.
659
    if (that.IsEmpty()) return MaybeLocal<T>();
660
    T::Cast(that.local_.template value<S>());
661
#endif
662
    return MaybeLocal<T>(that.local_);
663
  }
664
665
  /**
666
   * Calling this is equivalent to MaybeLocal<S>::Cast().
667
   * In particular, this is only valid if the handle actually refers to a value
668
   * of the target type.
669
   */
670
  template <class S>
671
  V8_INLINE MaybeLocal<S> As() const {
672
    return MaybeLocal<S>::Cast(*this);
673
  }
674
675
 private:
676
  Local<T> local_;
677
678
  template <typename S>
679
  friend class MaybeLocal;
680
};
681
682
/**
683
 * A HandleScope which first allocates a handle in the current scope
684
 * which will be later filled with the escape value.
685
 */
686
class V8_EXPORT V8_NODISCARD EscapableHandleScopeBase : public HandleScope {
687
 public:
688
  explicit EscapableHandleScopeBase(Isolate* isolate);
689
  V8_INLINE ~EscapableHandleScopeBase() = default;
690
691
  EscapableHandleScopeBase(const EscapableHandleScopeBase&) = delete;
692
  void operator=(const EscapableHandleScopeBase&) = delete;
693
  void* operator new(size_t size) = delete;
694
  void* operator new[](size_t size) = delete;
695
  void operator delete(void*, size_t) = delete;
696
  void operator delete[](void*, size_t) = delete;
697
698
 protected:
699
  /**
700
   * Pushes the value into the previous scope and returns a handle to it.
701
   * Cannot be called twice.
702
   */
703
  internal::Address* EscapeSlot(internal::Address* escape_value);
704
705
 private:
706
  internal::Address* escape_slot_;
707
};
708
709
class V8_EXPORT V8_NODISCARD EscapableHandleScope
710
    : public EscapableHandleScopeBase {
711
 public:
712
  explicit EscapableHandleScope(Isolate* isolate)
713
24.7M
      : EscapableHandleScopeBase(isolate) {}
714
  V8_INLINE ~EscapableHandleScope() = default;
715
  template <class T>
716
24.7M
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
24.7M
    if (value.IsEmpty()) return value;
721
24.6M
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
24.7M
#endif
723
24.7M
  }
v8::Local<v8::Object> v8::EscapableHandleScope::Escape<v8::Object>(v8::Local<v8::Object>)
Line
Count
Source
716
5.36M
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
5.36M
    if (value.IsEmpty()) return value;
721
5.36M
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
5.36M
#endif
723
5.36M
  }
v8::Local<v8::Array> v8::EscapableHandleScope::Escape<v8::Array>(v8::Local<v8::Array>)
Line
Count
Source
716
5.38M
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
5.38M
    if (value.IsEmpty()) return value;
721
5.38M
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
5.38M
#endif
723
5.38M
  }
v8::Local<v8::Value> v8::EscapableHandleScope::Escape<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
716
1.34M
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
1.34M
    if (value.IsEmpty()) return value;
721
1.25M
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
1.34M
#endif
723
1.34M
  }
Unexecuted instantiation: v8::Local<v8::Primitive> v8::EscapableHandleScope::Escape<v8::Primitive>(v8::Local<v8::Primitive>)
Unexecuted instantiation: v8::Local<v8::Promise> v8::EscapableHandleScope::Escape<v8::Promise>(v8::Local<v8::Promise>)
Unexecuted instantiation: v8::Local<v8::Uint8Array> v8::EscapableHandleScope::Escape<v8::Uint8Array>(v8::Local<v8::Uint8Array>)
v8::Local<v8::Function> v8::EscapableHandleScope::Escape<v8::Function>(v8::Local<v8::Function>)
Line
Count
Source
716
12.5M
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
12.5M
    if (value.IsEmpty()) return value;
721
12.5M
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
12.5M
#endif
723
12.5M
  }
v8::Local<v8::Context> v8::EscapableHandleScope::Escape<v8::Context>(v8::Local<v8::Context>)
Line
Count
Source
716
1.13k
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
1.13k
    if (value.IsEmpty()) return value;
721
1.13k
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
1.13k
#endif
723
1.13k
  }
Unexecuted instantiation: v8::Local<v8::StackTrace> v8::EscapableHandleScope::Escape<v8::StackTrace>(v8::Local<v8::StackTrace>)
v8::Local<v8::Integer> v8::EscapableHandleScope::Escape<v8::Integer>(v8::Local<v8::Integer>)
Line
Count
Source
716
151
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
151
    if (value.IsEmpty()) return value;
721
151
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
151
#endif
723
151
  }
v8::Local<v8::Map> v8::EscapableHandleScope::Escape<v8::Map>(v8::Local<v8::Map>)
Line
Count
Source
716
134k
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
134k
    if (value.IsEmpty()) return value;
721
134k
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
134k
#endif
723
134k
  }
724
725
  template <class T>
726
1.21M
  V8_INLINE MaybeLocal<T> EscapeMaybe(MaybeLocal<T> value) {
727
1.21M
    return Escape(value.FromMaybe(Local<T>()));
728
1.21M
  }
v8::MaybeLocal<v8::Value> v8::EscapableHandleScope::EscapeMaybe<v8::Value>(v8::MaybeLocal<v8::Value>)
Line
Count
Source
726
1.21M
  V8_INLINE MaybeLocal<T> EscapeMaybe(MaybeLocal<T> value) {
727
1.21M
    return Escape(value.FromMaybe(Local<T>()));
728
1.21M
  }
v8::MaybeLocal<v8::Object> v8::EscapableHandleScope::EscapeMaybe<v8::Object>(v8::MaybeLocal<v8::Object>)
Line
Count
Source
726
10
  V8_INLINE MaybeLocal<T> EscapeMaybe(MaybeLocal<T> value) {
727
10
    return Escape(value.FromMaybe(Local<T>()));
728
10
  }
729
};
730
731
/**
732
 * A SealHandleScope acts like a handle scope in which no handle allocations
733
 * are allowed. It can be useful for debugging handle leaks.
734
 * Handles can be allocated within inner normal HandleScopes.
735
 */
736
class V8_EXPORT V8_NODISCARD SealHandleScope {
737
 public:
738
  explicit SealHandleScope(Isolate* isolate);
739
  ~SealHandleScope();
740
741
  SealHandleScope(const SealHandleScope&) = delete;
742
  void operator=(const SealHandleScope&) = delete;
743
  void* operator new(size_t size) = delete;
744
  void* operator new[](size_t size) = delete;
745
  void operator delete(void*, size_t) = delete;
746
  void operator delete[](void*, size_t) = delete;
747
748
 private:
749
  internal::Isolate* const i_isolate_;
750
  internal::Address* prev_limit_;
751
  int prev_sealed_level_;
752
};
753
754
}  // namespace v8
755
756
#endif  // INCLUDE_V8_LOCAL_HANDLE_H_