Coverage Report

Created: 2025-08-03 10:06

/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
126k
  V8_INLINE Isolate* GetIsolate() const {
110
126k
    return reinterpret_cast<Isolate*>(i_isolate_);
111
126k
  }
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.01G
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::ObjectTemplate>::LocalBase()
Line
Count
Source
195
4.55M
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Value>::LocalBase()
Line
Count
Source
195
777M
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Function>::LocalBase()
Line
Count
Source
195
25.3M
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Context>::LocalBase()
Line
Count
Source
195
10.3k
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Object>::LocalBase()
Line
Count
Source
195
5.88M
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::String>::LocalBase()
Line
Count
Source
195
143M
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Signature>::LocalBase()
Line
Count
Source
195
40.1M
  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.17k
  V8_INLINE LocalBase() = default;
Unexecuted instantiation: v8::LocalBase<v8::Private>::LocalBase()
v8::LocalBase<v8::Symbol>::LocalBase()
Line
Count
Source
195
2.06k
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::FunctionTemplate>::LocalBase()
Line
Count
Source
195
3.50M
  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
253k
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Data>::LocalBase()
Line
Count
Source
195
11.8M
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::Boolean>::LocalBase()
Line
Count
Source
195
2.06k
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::ArrayBufferView>::LocalBase()
Line
Count
Source
195
1.03k
  V8_INLINE LocalBase() = default;
v8::LocalBase<v8::UnboundScript>::LocalBase()
Line
Count
Source
195
1.03k
  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
45.1k
  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
245M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Value>::LocalBase(unsigned long*)
Line
Count
Source
198
39.7M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Primitive>::LocalBase(unsigned long*)
Line
Count
Source
198
11.7M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Boolean>::LocalBase(unsigned long*)
Line
Count
Source
198
37.1M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Object>::LocalBase(unsigned long*)
Line
Count
Source
198
7.03M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::String>::LocalBase(unsigned long*)
Line
Count
Source
198
114M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Symbol>::LocalBase(unsigned long*)
Line
Count
Source
198
4.99M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::FunctionTemplate>::LocalBase(unsigned long*)
Line
Count
Source
198
2.75M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Uint32Array>::LocalBase(unsigned long*)
Line
Count
Source
198
888k
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Float64Array>::LocalBase(unsigned long*)
Line
Count
Source
198
634k
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Array>::LocalBase(unsigned long*)
Line
Count
Source
198
5.07M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::ObjectTemplate>::LocalBase(unsigned long*)
Line
Count
Source
198
4.68M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Int32Array>::LocalBase(unsigned long*)
Line
Count
Source
198
339k
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Uint8Array>::LocalBase(unsigned long*)
Line
Count
Source
198
507k
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Private>::LocalBase(unsigned long*)
Line
Count
Source
198
3.15M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Context>::LocalBase(unsigned long*)
Line
Count
Source
198
144k
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Function>::LocalBase(unsigned long*)
Line
Count
Source
198
11.8M
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Data>::LocalBase(unsigned long*)
Line
Count
Source
198
5.50k
      : 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.03k
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::BigInt64Array>::LocalBase(unsigned long*)
Line
Count
Source
198
253k
      : IndirectHandleBase(location) {}
Unexecuted instantiation: v8::LocalBase<v8::StackTrace>::LocalBase(unsigned long*)
v8::LocalBase<v8::Integer>::LocalBase(unsigned long*)
Line
Count
Source
198
152
      : IndirectHandleBase(location) {}
v8::LocalBase<v8::Map>::LocalBase(unsigned long*)
Line
Count
Source
198
126k
      : 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
779M
  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
118M
  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
332M
  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
30.3M
  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
3.83M
  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.50M
  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.2M
  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
36.8M
  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
18.7M
  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
64.6M
  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.16M
  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.64M
  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
57.5M
  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.66M
  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
21.4M
  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
888k
  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
634k
  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
46.0k
  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
135k
  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
119k
  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
15.6M
  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
3.85M
  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
339k
  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
253k
  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
9.51M
  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.33k
  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
7.52k
  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
126k
  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
85.8k
  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.50k
  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.06k
  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
272k
  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
35.0k
  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
345k
  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
128k
  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
428k
  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
8
  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
18
  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.08k
  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
154k
  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
33.0M
  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
85.7k
  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.03k
  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
253k
  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
595k
  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
213k
  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
126k
  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
253k
  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.77M
  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.51k
  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.51k
  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
300k
  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
3.81M
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
3.81M
    return LocalBase(HandleScope::CreateHandle(
205
3.81M
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
3.81M
  }
v8::LocalBase<v8::Value>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
4.13k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
4.13k
    return LocalBase(HandleScope::CreateHandle(
205
4.13k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
4.13k
  }
v8::LocalBase<v8::Data>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
5.50k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
5.50k
    return LocalBase(HandleScope::CreateHandle(
205
5.50k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
5.50k
  }
Unexecuted instantiation: v8::LocalBase<v8::Int8Array>::New(v8::Isolate*, unsigned long)
v8::LocalBase<v8::Uint8Array>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
507k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
507k
    return LocalBase(HandleScope::CreateHandle(
205
507k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
507k
  }
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
339k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
339k
    return LocalBase(HandleScope::CreateHandle(
205
339k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
339k
  }
v8::LocalBase<v8::Uint32Array>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
888k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
888k
    return LocalBase(HandleScope::CreateHandle(
205
888k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
888k
  }
Unexecuted instantiation: v8::LocalBase<v8::Float32Array>::New(v8::Isolate*, unsigned long)
v8::LocalBase<v8::Float64Array>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
634k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
634k
    return LocalBase(HandleScope::CreateHandle(
205
634k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
634k
  }
v8::LocalBase<v8::BigInt64Array>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
253k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
253k
    return LocalBase(HandleScope::CreateHandle(
205
253k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
253k
  }
v8::LocalBase<v8::Object>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
1.04M
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
1.04M
    return LocalBase(HandleScope::CreateHandle(
205
1.04M
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
1.04M
  }
v8::LocalBase<v8::Context>::New(v8::Isolate*, unsigned long)
Line
Count
Source
203
143k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
143k
    return LocalBase(HandleScope::CreateHandle(
205
143k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
143k
  }
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.03k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
204
1.03k
    return LocalBase(HandleScope::CreateHandle(
205
1.03k
        reinterpret_cast<internal::Isolate*>(isolate), value));
206
1.03k
  }
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
3.80M
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
3.80M
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
3.80M
    return LocalBase<T>::New(isolate,
211
3.80M
                             internal::ValueHelper::ValueAsAddress(that));
212
3.80M
  }
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
507k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
507k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
507k
    return LocalBase<T>::New(isolate,
211
507k
                             internal::ValueHelper::ValueAsAddress(that));
212
507k
  }
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
339k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
339k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
339k
    return LocalBase<T>::New(isolate,
211
339k
                             internal::ValueHelper::ValueAsAddress(that));
212
339k
  }
v8::LocalBase<v8::Uint32Array>::New(v8::Isolate*, v8::Uint32Array*)
Line
Count
Source
208
888k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
888k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
888k
    return LocalBase<T>::New(isolate,
211
888k
                             internal::ValueHelper::ValueAsAddress(that));
212
888k
  }
Unexecuted instantiation: v8::LocalBase<v8::Float32Array>::New(v8::Isolate*, v8::Float32Array*)
v8::LocalBase<v8::Float64Array>::New(v8::Isolate*, v8::Float64Array*)
Line
Count
Source
208
634k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
634k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
634k
    return LocalBase<T>::New(isolate,
211
634k
                             internal::ValueHelper::ValueAsAddress(that));
212
634k
  }
v8::LocalBase<v8::BigInt64Array>::New(v8::Isolate*, v8::BigInt64Array*)
Line
Count
Source
208
253k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
253k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
253k
    return LocalBase<T>::New(isolate,
211
253k
                             internal::ValueHelper::ValueAsAddress(that));
212
253k
  }
v8::LocalBase<v8::Object>::New(v8::Isolate*, v8::Object*)
Line
Count
Source
208
1.04M
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
1.04M
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
1.04M
    return LocalBase<T>::New(isolate,
211
1.04M
                             internal::ValueHelper::ValueAsAddress(that));
212
1.04M
  }
v8::LocalBase<v8::Context>::New(v8::Isolate*, v8::Context*)
Line
Count
Source
208
143k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
143k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
143k
    return LocalBase<T>::New(isolate,
211
143k
                             internal::ValueHelper::ValueAsAddress(that));
212
143k
  }
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.03k
  V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
209
1.03k
    if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>();
210
1.03k
    return LocalBase<T>::New(isolate,
211
1.03k
                             internal::ValueHelper::ValueAsAddress(that));
212
1.03k
  }
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
242M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
242M
    return LocalBase<T>(slot);
216
242M
  }
v8::LocalBase<v8::String>::FromSlot(unsigned long*)
Line
Count
Source
214
114M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
114M
    return LocalBase<T>(slot);
216
114M
  }
v8::LocalBase<v8::Primitive>::FromSlot(unsigned long*)
Line
Count
Source
214
11.7M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
11.7M
    return LocalBase<T>(slot);
216
11.7M
  }
v8::LocalBase<v8::Boolean>::FromSlot(unsigned long*)
Line
Count
Source
214
37.1M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
37.1M
    return LocalBase<T>(slot);
216
37.1M
  }
v8::LocalBase<v8::Value>::FromSlot(unsigned long*)
Line
Count
Source
214
39.7M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
39.7M
    return LocalBase<T>(slot);
216
39.7M
  }
v8::LocalBase<v8::Private>::FromSlot(unsigned long*)
Line
Count
Source
214
3.15M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
3.15M
    return LocalBase<T>(slot);
216
3.15M
  }
v8::LocalBase<v8::Symbol>::FromSlot(unsigned long*)
Line
Count
Source
214
4.99M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
4.99M
    return LocalBase<T>(slot);
216
4.99M
  }
v8::LocalBase<v8::FunctionTemplate>::FromSlot(unsigned long*)
Line
Count
Source
214
2.75M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
2.75M
    return LocalBase<T>(slot);
216
2.75M
  }
v8::LocalBase<v8::ObjectTemplate>::FromSlot(unsigned long*)
Line
Count
Source
214
4.68M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
4.68M
    return LocalBase<T>(slot);
216
4.68M
  }
v8::LocalBase<v8::Object>::FromSlot(unsigned long*)
Line
Count
Source
214
5.99M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
5.99M
    return LocalBase<T>(slot);
216
5.99M
  }
v8::LocalBase<v8::Array>::FromSlot(unsigned long*)
Line
Count
Source
214
5.07M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
5.07M
    return LocalBase<T>(slot);
216
5.07M
  }
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
11.8M
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
11.8M
    return LocalBase<T>(slot);
216
11.8M
  }
v8::LocalBase<v8::Context>::FromSlot(unsigned long*)
Line
Count
Source
214
1.03k
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
1.03k
    return LocalBase<T>(slot);
216
1.03k
  }
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
152
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
152
    return LocalBase<T>(slot);
216
152
  }
v8::LocalBase<v8::Map>::FromSlot(unsigned long*)
Line
Count
Source
214
126k
  V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
215
126k
    return LocalBase<T>(slot);
216
126k
  }
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.01G
  V8_INLINE Local() = default;
v8::Local<v8::ObjectTemplate>::Local()
Line
Count
Source
259
4.55M
  V8_INLINE Local() = default;
v8::Local<v8::Value>::Local()
Line
Count
Source
259
777M
  V8_INLINE Local() = default;
v8::Local<v8::Function>::Local()
Line
Count
Source
259
25.3M
  V8_INLINE Local() = default;
v8::Local<v8::Context>::Local()
Line
Count
Source
259
10.3k
  V8_INLINE Local() = default;
v8::Local<v8::Object>::Local()
Line
Count
Source
259
5.88M
  V8_INLINE Local() = default;
v8::Local<v8::String>::Local()
Line
Count
Source
259
143M
  V8_INLINE Local() = default;
v8::Local<v8::Signature>::Local()
Line
Count
Source
259
40.1M
  V8_INLINE Local() = default;
v8::Local<v8::Array>::Local()
Line
Count
Source
259
1.17k
  V8_INLINE Local() = default;
Unexecuted instantiation: v8::Local<v8::Private>::Local()
v8::Local<v8::Symbol>::Local()
Line
Count
Source
259
2.06k
  V8_INLINE Local() = default;
v8::Local<v8::FunctionTemplate>::Local()
Line
Count
Source
259
3.50M
  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
253k
  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
11.8M
  V8_INLINE Local() = default;
v8::Local<v8::Boolean>::Local()
Line
Count
Source
259
2.06k
  V8_INLINE Local() = default;
v8::Local<v8::ArrayBufferView>::Local()
Line
Count
Source
259
1.03k
  V8_INLINE Local() = default;
v8::Local<v8::UnboundScript>::Local()
Line
Count
Source
259
1.03k
  V8_INLINE Local() = default;
Unexecuted instantiation: v8::Local<v8::StackTrace>::Local()
v8::Local<v8::Name>::Local()
Line
Count
Source
259
45.1k
  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
694M
  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
694M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
694M
  }
v8::Local<v8::Name>::Local<v8::String>(v8::Local<v8::String>)
Line
Count
Source
262
118M
  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
118M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
118M
  }
v8::Local<v8::Value>::Local<v8::String>(v8::Local<v8::String>)
Line
Count
Source
262
287M
  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
287M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
287M
  }
v8::Local<v8::Value>::Local<v8::Object>(v8::Local<v8::Object>)
Line
Count
Source
262
30.3M
  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
30.3M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
30.3M
  }
v8::Local<v8::Value>::Local<v8::Array>(v8::Local<v8::Array>)
Line
Count
Source
262
5.50M
  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.50M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
5.50M
  }
v8::Local<v8::Value>::Local<v8::Primitive>(v8::Local<v8::Primitive>)
Line
Count
Source
262
11.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
11.2M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
11.2M
  }
v8::Local<v8::Value>::Local<v8::Boolean>(v8::Local<v8::Boolean>)
Line
Count
Source
262
36.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
36.8M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
36.8M
  }
v8::Local<v8::Value>::Local<v8::Function>(v8::Local<v8::Function>)
Line
Count
Source
262
18.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
18.7M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
18.7M
  }
v8::Local<v8::Value>::Local<v8::Integer>(v8::Local<v8::Integer>)
Line
Count
Source
262
64.6M
  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
64.6M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
64.6M
  }
v8::Local<v8::Value>::Local<v8::Number>(v8::Local<v8::Number>)
Line
Count
Source
262
57.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
57.5M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
57.5M
  }
v8::Local<v8::Value>::Local<v8::Symbol>(v8::Local<v8::Symbol>)
Line
Count
Source
262
2.38M
  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.38M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
2.38M
  }
v8::Local<v8::Template>::Local<v8::ObjectTemplate>(v8::Local<v8::ObjectTemplate>)
Line
Count
Source
262
21.4M
  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
21.4M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
21.4M
  }
v8::Local<v8::Value>::Local<v8::Uint32Array>(v8::Local<v8::Uint32Array>)
Line
Count
Source
262
888k
  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
888k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
888k
  }
v8::Local<v8::Value>::Local<v8::Float64Array>(v8::Local<v8::Float64Array>)
Line
Count
Source
262
634k
  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
634k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
634k
  }
v8::Local<v8::Value>::Local<v8::Name>(v8::Local<v8::Name>)
Line
Count
Source
262
46.0k
  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
46.0k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
46.0k
  }
v8::Local<v8::Value>::Local<v8::Int32Array>(v8::Local<v8::Int32Array>)
Line
Count
Source
262
339k
  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
339k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
339k
  }
v8::Local<v8::Value>::Local<v8::Uint8Array>(v8::Local<v8::Uint8Array>)
Line
Count
Source
262
253k
  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
253k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
253k
  }
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
126k
  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
126k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
126k
  }
v8::Local<v8::Data>::Local<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
262
85.8k
  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
85.8k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
85.8k
  }
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
272k
  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
272k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
272k
  }
v8::Local<v8::Data>::Local<v8::PrimitiveArray>(v8::Local<v8::PrimitiveArray>)
Line
Count
Source
262
345k
  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
345k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
345k
  }
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
428k
  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
428k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
428k
  }
v8::Local<v8::Value>::Local<v8::ArrayBuffer>(v8::Local<v8::ArrayBuffer>)
Line
Count
Source
262
18
  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
18
    static_assert(std::is_base_of<T, S>::value, "type check");
269
18
  }
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
33.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
33.0M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
33.0M
  }
v8::Local<v8::Name>::Local<v8::Symbol>(v8::Local<v8::Symbol>)
Line
Count
Source
262
85.7k
  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
85.7k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
85.7k
  }
v8::Local<v8::Data>::Local<v8::UnboundScript>(v8::Local<v8::UnboundScript>)
Line
Count
Source
262
1.03k
  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.03k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
1.03k
  }
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
253k
  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
253k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
253k
  }
v8::Local<v8::Data>::Local<v8::Integer>(v8::Local<v8::Integer>)
Line
Count
Source
262
213k
  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
213k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
213k
  }
v8::Local<v8::Data>::Local<v8::Symbol>(v8::Local<v8::Symbol>)
Line
Count
Source
262
126k
  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
126k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
126k
  }
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
253k
  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
253k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
253k
  }
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.77M
  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.77M
    static_assert(std::is_base_of<T, S>::value, "type check");
269
1.77M
  }
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.51k
  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.51k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
5.51k
  }
v8::Local<v8::Data>::Local<v8::Boolean>(v8::Local<v8::Boolean>)
Line
Count
Source
262
300k
  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
300k
    static_assert(std::is_base_of<T, S>::value, "type check");
269
300k
  }
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
787M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Value>::operator->() const
Line
Count
Source
271
134M
  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
173M
  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
52.4M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Template>::operator->() const
Line
Count
Source
271
21.4M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Function>::operator->() const
Line
Count
Source
271
20.7M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Object>::operator->() const
Line
Count
Source
271
289M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::ObjectTemplate>::operator->() const
Line
Count
Source
271
26.9M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Array>::operator->() const
Line
Count
Source
271
1.79M
  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
119k
  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.28M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::String>::operator->() const
Line
Count
Source
271
32.2M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::ArrayBuffer>::operator->() const
Line
Count
Source
271
2.96M
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Script>::operator->() const
Line
Count
Source
271
4.06k
  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.51k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Uint8Array>::operator->() const
Line
Count
Source
271
257k
  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.33k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Name>::operator->() const
Line
Count
Source
271
1.18M
  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
272k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::ArrayBufferView>::operator->() const
Line
Count
Source
271
529k
  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
126k
  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.08k
  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.09k
  V8_INLINE T* operator->() const { return this->template value<T>(); }
v8::Local<v8::Message>::operator->() const
Line
Count
Source
271
1.48M
  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
25.0M
  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
65.9M
  V8_INLINE T* operator*() const { return this->operator->(); }
v8::Local<v8::Value>::operator*() const
Line
Count
Source
273
61.4M
  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
126k
  V8_INLINE T* operator*() const { return this->operator->(); }
v8::Local<v8::Object>::operator*() const
Line
Count
Source
273
1.01M
  V8_INLINE T* operator*() const { return this->operator->(); }
v8::Local<v8::Function>::operator*() const
Line
Count
Source
273
3.15M
  V8_INLINE T* operator*() const { return this->operator->(); }
v8::Local<v8::Context>::operator*() const
Line
Count
Source
273
255k
  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.03k
  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
360k
  V8_INLINE bool operator==(const Local<S>& that) const {
288
360k
    return internal::HandleHelper::EqualHandles(*this, that);
289
360k
  }
bool v8::Local<v8::Object>::operator==<v8::Object>(v8::Local<v8::Object> const&) const
Line
Count
Source
287
100k
  V8_INLINE bool operator==(const Local<S>& that) const {
288
100k
    return internal::HandleHelper::EqualHandles(*this, that);
289
100k
  }
bool v8::Local<v8::Context>::operator==<v8::Context>(v8::Local<v8::Context> const&) const
Line
Count
Source
287
255k
  V8_INLINE bool operator==(const Local<S>& that) const {
288
255k
    return internal::HandleHelper::EqualHandles(*this, that);
289
255k
  }
bool v8::Local<v8::Value>::operator==<v8::Object>(v8::Local<v8::Object> const&) const
Line
Count
Source
287
4.13k
  V8_INLINE bool operator==(const Local<S>& that) const {
288
4.13k
    return internal::HandleHelper::EqualHandles(*this, that);
289
4.13k
  }
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
227k
  V8_INLINE bool operator!=(const Local<S>& that) const {
298
227k
    return !operator==(that);
299
227k
  }
bool v8::Local<v8::Object>::operator!=<v8::Object>(v8::Local<v8::Object> const&) const
Line
Count
Source
297
100k
  V8_INLINE bool operator!=(const Local<S>& that) const {
298
100k
    return !operator==(that);
299
100k
  }
bool v8::Local<v8::Context>::operator!=<v8::Context>(v8::Local<v8::Context> const&) const
Line
Count
Source
297
126k
  V8_INLINE bool operator!=(const Local<S>& that) const {
298
126k
    return !operator==(that);
299
126k
  }
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
24.3M
  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
24.3M
    return Local<T>(LocalBase<T>(that));
320
24.3M
  }
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
3.83M
  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.83M
    return Local<T>(LocalBase<T>(that));
320
3.83M
  }
v8::Local<v8::Function> v8::Local<v8::Function>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
3.64M
  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.64M
    return Local<T>(LocalBase<T>(that));
320
3.64M
  }
v8::Local<v8::Name> v8::Local<v8::Name>::Cast<v8::String>(v8::Local<v8::String>)
Line
Count
Source
312
917
  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
917
    return Local<T>(LocalBase<T>(that));
320
917
  }
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
135k
  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
135k
    return Local<T>(LocalBase<T>(that));
320
135k
  }
v8::Local<v8::Int32> v8::Local<v8::Int32>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
119k
  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
119k
    return Local<T>(LocalBase<T>(that));
320
119k
  }
v8::Local<v8::String> v8::Local<v8::String>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
15.6M
  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
15.6M
    return Local<T>(LocalBase<T>(that));
320
15.6M
  }
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.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
  }
v8::Local<v8::Name> v8::Local<v8::Name>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
7.52k
  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
7.52k
    return Local<T>(LocalBase<T>(that));
320
7.52k
  }
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.50k
  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.50k
    return Local<T>(LocalBase<T>(that));
320
5.50k
  }
v8::Local<v8::Symbol> v8::Local<v8::Symbol>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
2.06k
  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.06k
    return Local<T>(LocalBase<T>(that));
320
2.06k
  }
v8::Local<v8::ArrayBufferView> v8::Local<v8::ArrayBufferView>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
35.0k
  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
35.0k
    return Local<T>(LocalBase<T>(that));
320
35.0k
  }
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
128k
  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
128k
    return Local<T>(LocalBase<T>(that));
320
128k
  }
v8::Local<v8::ArrayBuffer> v8::Local<v8::ArrayBuffer>::Cast<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
312
8
  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
    return Local<T>(LocalBase<T>(that));
320
8
  }
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.08k
  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.08k
    return Local<T>(LocalBase<T>(that));
320
1.08k
  }
v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Object>(v8::Local<v8::Object>)
Line
Count
Source
312
11.0k
  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.0k
    return Local<T>(LocalBase<T>(that));
320
11.0k
  }
v8::Local<v8::ArrayBufferView> v8::Local<v8::ArrayBufferView>::Cast<v8::Object>(v8::Local<v8::Object>)
Line
Count
Source
312
154k
  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
154k
    return Local<T>(LocalBase<T>(that));
320
154k
  }
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
595k
  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
595k
    return Local<T>(LocalBase<T>(that));
320
595k
  }
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.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
5.51k
    return Local<T>(LocalBase<T>(that));
320
5.51k
  }
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.13k
  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.13k
    return Local<T>(LocalBase<T>(that));
320
1.13k
  }
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
24.3M
  V8_INLINE Local<S> As() const {
329
24.3M
    return Local<S>::Cast(*this);
330
24.3M
  }
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
3.83M
  V8_INLINE Local<S> As() const {
329
3.83M
    return Local<S>::Cast(*this);
330
3.83M
  }
v8::Local<v8::Function> v8::Local<v8::Value>::As<v8::Function>() const
Line
Count
Source
328
3.64M
  V8_INLINE Local<S> As() const {
329
3.64M
    return Local<S>::Cast(*this);
330
3.64M
  }
v8::Local<v8::Name> v8::Local<v8::String>::As<v8::Name>() const
Line
Count
Source
328
917
  V8_INLINE Local<S> As() const {
329
917
    return Local<S>::Cast(*this);
330
917
  }
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
135k
  V8_INLINE Local<S> As() const {
329
135k
    return Local<S>::Cast(*this);
330
135k
  }
v8::Local<v8::Int32> v8::Local<v8::Value>::As<v8::Int32>() const
Line
Count
Source
328
119k
  V8_INLINE Local<S> As() const {
329
119k
    return Local<S>::Cast(*this);
330
119k
  }
v8::Local<v8::String> v8::Local<v8::Value>::As<v8::String>() const
Line
Count
Source
328
15.6M
  V8_INLINE Local<S> As() const {
329
15.6M
    return Local<S>::Cast(*this);
330
15.6M
  }
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.33k
  V8_INLINE Local<S> As() const {
329
1.33k
    return Local<S>::Cast(*this);
330
1.33k
  }
v8::Local<v8::Name> v8::Local<v8::Value>::As<v8::Name>() const
Line
Count
Source
328
7.52k
  V8_INLINE Local<S> As() const {
329
7.52k
    return Local<S>::Cast(*this);
330
7.52k
  }
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.50k
  V8_INLINE Local<S> As() const {
329
5.50k
    return Local<S>::Cast(*this);
330
5.50k
  }
v8::Local<v8::Symbol> v8::Local<v8::Value>::As<v8::Symbol>() const
Line
Count
Source
328
2.06k
  V8_INLINE Local<S> As() const {
329
2.06k
    return Local<S>::Cast(*this);
330
2.06k
  }
v8::Local<v8::ArrayBufferView> v8::Local<v8::Value>::As<v8::ArrayBufferView>() const
Line
Count
Source
328
35.0k
  V8_INLINE Local<S> As() const {
329
35.0k
    return Local<S>::Cast(*this);
330
35.0k
  }
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
128k
  V8_INLINE Local<S> As() const {
329
128k
    return Local<S>::Cast(*this);
330
128k
  }
v8::Local<v8::ArrayBuffer> v8::Local<v8::Value>::As<v8::ArrayBuffer>() const
Line
Count
Source
328
8
  V8_INLINE Local<S> As() const {
329
8
    return Local<S>::Cast(*this);
330
8
  }
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.08k
  V8_INLINE Local<S> As() const {
329
1.08k
    return Local<S>::Cast(*this);
330
1.08k
  }
v8::Local<v8::Value> v8::Local<v8::Object>::As<v8::Value>() const
Line
Count
Source
328
11.0k
  V8_INLINE Local<S> As() const {
329
11.0k
    return Local<S>::Cast(*this);
330
11.0k
  }
v8::Local<v8::ArrayBufferView> v8::Local<v8::Object>::As<v8::ArrayBufferView>() const
Line
Count
Source
328
154k
  V8_INLINE Local<S> As() const {
329
154k
    return Local<S>::Cast(*this);
330
154k
  }
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
595k
  V8_INLINE Local<S> As() const {
329
595k
    return Local<S>::Cast(*this);
330
595k
  }
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.51k
  V8_INLINE Local<S> As() const {
329
5.51k
    return Local<S>::Cast(*this);
330
5.51k
  }
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.13k
  V8_INLINE Local<S> As() const {
329
1.13k
    return Local<S>::Cast(*this);
330
1.13k
  }
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
3.80M
                                const PersistentBase<T>& that) {
343
3.80M
    return New(isolate, that.template value<T, true>());
344
3.80M
  }
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
507k
                                const PersistentBase<T>& that) {
343
507k
    return New(isolate, that.template value<T, true>());
344
507k
  }
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
339k
                                const PersistentBase<T>& that) {
343
339k
    return New(isolate, that.template value<T, true>());
344
339k
  }
v8::Local<v8::Uint32Array>::New(v8::Isolate*, v8::PersistentBase<v8::Uint32Array> const&)
Line
Count
Source
342
888k
                                const PersistentBase<T>& that) {
343
888k
    return New(isolate, that.template value<T, true>());
344
888k
  }
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
634k
                                const PersistentBase<T>& that) {
343
634k
    return New(isolate, that.template value<T, true>());
344
634k
  }
v8::Local<v8::BigInt64Array>::New(v8::Isolate*, v8::PersistentBase<v8::BigInt64Array> const&)
Line
Count
Source
342
253k
                                const PersistentBase<T>& that) {
343
253k
    return New(isolate, that.template value<T, true>());
344
253k
  }
v8::Local<v8::Object>::New(v8::Isolate*, v8::PersistentBase<v8::Object> const&)
Line
Count
Source
342
1.04M
                                const PersistentBase<T>& that) {
343
1.04M
    return New(isolate, that.template value<T, true>());
344
1.04M
  }
v8::Local<v8::Context>::New(v8::Isolate*, v8::PersistentBase<v8::Context> const&)
Line
Count
Source
342
143k
                                const PersistentBase<T>& that) {
343
143k
    return New(isolate, that.template value<T, true>());
344
143k
  }
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.03k
                                const PersistentBase<T>& that) {
343
1.03k
    return New(isolate, that.template value<T, true>());
344
1.03k
  }
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
331M
      : LocalBase<T>(other) {}
v8::Local<v8::Value>::Local(v8::LocalBase<v8::Value> const&)
Line
Count
Source
401
100M
      : LocalBase<T>(other) {}
v8::Local<v8::Primitive>::Local(v8::LocalBase<v8::Primitive> const&)
Line
Count
Source
401
11.7M
      : LocalBase<T>(other) {}
v8::Local<v8::Boolean>::Local(v8::LocalBase<v8::Boolean> const&)
Line
Count
Source
401
37.2M
      : LocalBase<T>(other) {}
v8::Local<v8::Object>::Local(v8::LocalBase<v8::Object> const&)
Line
Count
Source
401
10.8M
      : LocalBase<T>(other) {}
v8::Local<v8::String>::Local(v8::LocalBase<v8::String> const&)
Line
Count
Source
401
131M
      : LocalBase<T>(other) {}
v8::Local<v8::Symbol>::Local(v8::LocalBase<v8::Symbol> const&)
Line
Count
Source
401
4.99M
      : LocalBase<T>(other) {}
v8::Local<v8::FunctionTemplate>::Local(v8::LocalBase<v8::FunctionTemplate> const&)
Line
Count
Source
401
2.75M
      : 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
15.4M
      : LocalBase<T>(other) {}
v8::Local<v8::Uint32Array>::Local(v8::LocalBase<v8::Uint32Array> const&)
Line
Count
Source
401
893k
      : LocalBase<T>(other) {}
v8::Local<v8::Float64Array>::Local(v8::LocalBase<v8::Float64Array> const&)
Line
Count
Source
401
634k
      : LocalBase<T>(other) {}
v8::Local<v8::Array>::Local(v8::LocalBase<v8::Array> const&)
Line
Count
Source
401
5.21M
      : LocalBase<T>(other) {}
v8::Local<v8::Name>::Local(v8::LocalBase<v8::Name> const&)
Line
Count
Source
401
8.44k
      : LocalBase<T>(other) {}
v8::Local<v8::Int32>::Local(v8::LocalBase<v8::Int32> const&)
Line
Count
Source
401
119k
      : LocalBase<T>(other) {}
v8::Local<v8::ObjectTemplate>::Local(v8::LocalBase<v8::ObjectTemplate> const&)
Line
Count
Source
401
4.68M
      : LocalBase<T>(other) {}
v8::Local<v8::Int32Array>::Local(v8::LocalBase<v8::Int32Array> const&)
Line
Count
Source
401
339k
      : LocalBase<T>(other) {}
v8::Local<v8::Uint8Array>::Local(v8::LocalBase<v8::Uint8Array> const&)
Line
Count
Source
401
507k
      : LocalBase<T>(other) {}
v8::Local<v8::Private>::Local(v8::LocalBase<v8::Private> const&)
Line
Count
Source
401
3.15M
      : LocalBase<T>(other) {}
v8::Local<v8::Context>::Local(v8::LocalBase<v8::Context> const&)
Line
Count
Source
401
144k
      : 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.33k
      : LocalBase<T>(other) {}
v8::Local<v8::Data>::Local(v8::LocalBase<v8::Data> const&)
Line
Count
Source
401
5.50k
      : 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
189k
      : 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
8
      : 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.24k
      : LocalBase<T>(other) {}
v8::Local<v8::UnboundScript>::Local(v8::LocalBase<v8::UnboundScript> const&)
Line
Count
Source
401
1.03k
      : LocalBase<T>(other) {}
v8::Local<v8::BigInt64Array>::Local(v8::LocalBase<v8::BigInt64Array> const&)
Line
Count
Source
401
253k
      : 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
126k
      : 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
242M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
242M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
242M
  }
v8::Local<v8::String>::FromSlot(unsigned long*)
Line
Count
Source
403
114M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
114M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
114M
  }
v8::Local<v8::Primitive>::FromSlot(unsigned long*)
Line
Count
Source
403
11.7M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
11.7M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
11.7M
  }
v8::Local<v8::Boolean>::FromSlot(unsigned long*)
Line
Count
Source
403
37.1M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
37.1M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
37.1M
  }
v8::Local<v8::Value>::FromSlot(unsigned long*)
Line
Count
Source
403
39.7M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
39.7M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
39.7M
  }
v8::Local<v8::Private>::FromSlot(unsigned long*)
Line
Count
Source
403
3.15M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
3.15M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
3.15M
  }
v8::Local<v8::Symbol>::FromSlot(unsigned long*)
Line
Count
Source
403
4.99M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
4.99M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
4.99M
  }
v8::Local<v8::FunctionTemplate>::FromSlot(unsigned long*)
Line
Count
Source
403
2.75M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
2.75M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
2.75M
  }
v8::Local<v8::ObjectTemplate>::FromSlot(unsigned long*)
Line
Count
Source
403
4.68M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
4.68M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
4.68M
  }
v8::Local<v8::Object>::FromSlot(unsigned long*)
Line
Count
Source
403
5.99M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
5.99M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
5.99M
  }
v8::Local<v8::Array>::FromSlot(unsigned long*)
Line
Count
Source
403
5.07M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
5.07M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
5.07M
  }
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
11.8M
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
11.8M
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
11.8M
  }
v8::Local<v8::Context>::FromSlot(unsigned long*)
Line
Count
Source
403
1.03k
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
1.03k
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
1.03k
  }
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
152
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
152
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
152
  }
v8::Local<v8::Map>::FromSlot(unsigned long*)
Line
Count
Source
403
126k
  V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
404
126k
    return Local<T>(LocalBase<T>::FromSlot(slot));
405
126k
  }
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
9.64k
  V8_INLINE static Local<T> New(Isolate* isolate, internal::Address value) {
414
9.64k
    return Local<T>(LocalBase<T>::New(isolate, value));
415
9.64k
  }
v8::Local<v8::Data>::New(v8::Isolate*, unsigned long)
Line
Count
Source
413
5.50k
  V8_INLINE static Local<T> New(Isolate* isolate, internal::Address value) {
414
5.50k
    return Local<T>(LocalBase<T>::New(isolate, value));
415
5.50k
  }
v8::Local<v8::Value>::New(v8::Isolate*, unsigned long)
Line
Count
Source
413
4.13k
  V8_INLINE static Local<T> New(Isolate* isolate, internal::Address value) {
414
4.13k
    return Local<T>(LocalBase<T>::New(isolate, value));
415
4.13k
  }
416
417
3.80M
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
3.80M
    return Local<T>(LocalBase<T>::New(isolate, that));
419
3.80M
  }
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
507k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
507k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
507k
  }
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
339k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
339k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
339k
  }
v8::Local<v8::Uint32Array>::New(v8::Isolate*, v8::Uint32Array*)
Line
Count
Source
417
888k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
888k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
888k
  }
Unexecuted instantiation: v8::Local<v8::Float32Array>::New(v8::Isolate*, v8::Float32Array*)
v8::Local<v8::Float64Array>::New(v8::Isolate*, v8::Float64Array*)
Line
Count
Source
417
634k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
634k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
634k
  }
v8::Local<v8::BigInt64Array>::New(v8::Isolate*, v8::BigInt64Array*)
Line
Count
Source
417
253k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
253k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
253k
  }
v8::Local<v8::Object>::New(v8::Isolate*, v8::Object*)
Line
Count
Source
417
1.04M
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
1.04M
    return Local<T>(LocalBase<T>::New(isolate, that));
419
1.04M
  }
v8::Local<v8::Context>::New(v8::Isolate*, v8::Context*)
Line
Count
Source
417
143k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
143k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
143k
  }
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.03k
  V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
418
1.03k
    return Local<T>(LocalBase<T>::New(isolate, that));
419
1.03k
  }
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
61.2M
  V8_INLINE Local<S> UnsafeAs() const {
424
61.2M
    return Local<S>(LocalBase<S>(*this));
425
61.2M
  }
v8::Local<v8::Value> v8::Local<v8::FunctionTemplate>::UnsafeAs<v8::Value>() const
Line
Count
Source
423
1.16M
  V8_INLINE Local<S> UnsafeAs() const {
424
1.16M
    return Local<S>(LocalBase<S>(*this));
425
1.16M
  }
v8::Local<v8::Value> v8::Local<v8::ObjectTemplate>::UnsafeAs<v8::Value>() const
Line
Count
Source
423
3.85M
  V8_INLINE Local<S> UnsafeAs() const {
424
3.85M
    return Local<S>(LocalBase<S>(*this));
425
3.85M
  }
v8::Local<v8::Value> v8::Local<v8::Private>::UnsafeAs<v8::Value>() const
Line
Count
Source
423
9.51M
  V8_INLINE Local<S> UnsafeAs() const {
424
9.51M
    return Local<S>(LocalBase<S>(*this));
425
9.51M
  }
v8::Local<v8::Value> v8::Local<v8::Symbol>::UnsafeAs<v8::Value>() const
Line
Count
Source
423
2.28M
  V8_INLINE Local<S> UnsafeAs() const {
424
2.28M
    return Local<S>(LocalBase<S>(*this));
425
2.28M
  }
v8::Local<v8::Value> v8::Local<v8::String>::UnsafeAs<v8::Value>() const
Line
Count
Source
423
44.4M
  V8_INLINE Local<S> UnsafeAs() const {
424
44.4M
    return Local<S>(LocalBase<S>(*this));
425
44.4M
  }
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
943k
  V8_INLINE MaybeLocal() : local_() {}
v8::MaybeLocal<v8::Value>::MaybeLocal()
Line
Count
Source
615
347k
  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
596k
  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
130M
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::Value>::MaybeLocal<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
617
1.52M
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::Value>::MaybeLocal<v8::String>(v8::Local<v8::String>)
Line
Count
Source
617
99.0M
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::Object>::MaybeLocal<v8::Object>(v8::Local<v8::Object>)
Line
Count
Source
617
638k
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::ObjectTemplate>::MaybeLocal<v8::ObjectTemplate>(v8::Local<v8::ObjectTemplate>)
Line
Count
Source
617
127k
  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
11.8M
  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.74k
  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
11.9M
  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.07M
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::Context>::MaybeLocal<v8::Context>(v8::Local<v8::Context>)
Line
Count
Source
617
1.03k
  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
126k
  V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
v8::MaybeLocal<v8::Value>::MaybeLocal<v8::Boolean>(v8::Local<v8::Boolean>)
Line
Count
Source
617
126k
  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
626M
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
v8::MaybeLocal<v8::String>::IsEmpty() const
Line
Count
Source
619
441M
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
v8::MaybeLocal<v8::Value>::IsEmpty() const
Line
Count
Source
619
113M
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
v8::MaybeLocal<v8::Function>::IsEmpty() const
Line
Count
Source
619
41.0M
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
v8::MaybeLocal<v8::Object>::IsEmpty() const
Line
Count
Source
619
5.57M
  V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
v8::MaybeLocal<v8::Context>::IsEmpty() const
Line
Count
Source
619
8.26k
  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
10.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.74k
  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
16.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.03k
  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
24.8M
  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
151M
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
151M
    *out = local_;
628
151M
    return !IsEmpty();
629
151M
  }
bool v8::MaybeLocal<v8::Value>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const
Line
Count
Source
626
83.1M
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
83.1M
    *out = local_;
628
83.1M
    return !IsEmpty();
629
83.1M
  }
bool v8::MaybeLocal<v8::Function>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const
Line
Count
Source
626
263k
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
263k
    *out = local_;
628
263k
    return !IsEmpty();
629
263k
  }
bool v8::MaybeLocal<v8::Object>::ToLocal<v8::Object>(v8::Local<v8::Object>*) const
Line
Count
Source
626
649k
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
649k
    *out = local_;
628
649k
    return !IsEmpty();
629
649k
  }
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
43.6M
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
43.6M
    *out = local_;
628
43.6M
    return !IsEmpty();
629
43.6M
  }
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.16k
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
1.16k
    *out = local_;
628
1.16k
    return !IsEmpty();
629
1.16k
  }
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
23.9M
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
23.9M
    *out = local_;
628
23.9M
    return !IsEmpty();
629
23.9M
  }
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
8.26k
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
8.26k
    *out = local_;
628
8.26k
    return !IsEmpty();
629
8.26k
  }
bool v8::MaybeLocal<v8::UnboundScript>::ToLocal<v8::UnboundScript>(v8::Local<v8::UnboundScript>*) const
Line
Count
Source
626
1.03k
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
1.03k
    *out = local_;
628
1.03k
    return !IsEmpty();
629
1.03k
  }
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
9
  V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const {
627
9
    *out = local_;
628
9
    return !IsEmpty();
629
9
  }
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
345M
  V8_INLINE Local<T> ToLocalChecked() {
636
345M
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
345M
    return local_;
638
345M
  }
v8::MaybeLocal<v8::String>::ToLocalChecked()
Line
Count
Source
635
297M
  V8_INLINE Local<T> ToLocalChecked() {
636
297M
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
297M
    return local_;
638
297M
  }
v8::MaybeLocal<v8::Value>::ToLocalChecked()
Line
Count
Source
635
26.1M
  V8_INLINE Local<T> ToLocalChecked() {
636
26.1M
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
26.1M
    return local_;
638
26.1M
  }
v8::MaybeLocal<v8::Function>::ToLocalChecked()
Line
Count
Source
635
16.8M
  V8_INLINE Local<T> ToLocalChecked() {
636
16.8M
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
16.8M
    return local_;
638
16.8M
  }
v8::MaybeLocal<v8::Object>::ToLocalChecked()
Line
Count
Source
635
4.74M
  V8_INLINE Local<T> ToLocalChecked() {
636
4.74M
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
4.74M
    return local_;
638
4.74M
  }
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
7.52k
  V8_INLINE Local<T> ToLocalChecked() {
636
7.52k
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
7.52k
    return local_;
638
7.52k
  }
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.02k
  V8_INLINE Local<T> ToLocalChecked() {
636
3.02k
    if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty();
637
3.02k
    return local_;
638
3.02k
  }
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
100M
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
100M
    return IsEmpty() ? default_value : Local<S>(local_);
647
100M
  }
v8::Local<v8::String> v8::MaybeLocal<v8::String>::FromMaybe<v8::String>(v8::Local<v8::String>) const
Line
Count
Source
645
99.0M
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
99.0M
    return IsEmpty() ? default_value : Local<S>(local_);
647
99.0M
  }
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.14M
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
1.14M
    return IsEmpty() ? default_value : Local<S>(local_);
647
1.14M
  }
v8::Local<v8::Object> v8::MaybeLocal<v8::Object>::FromMaybe<v8::Object>(v8::Local<v8::Object>) const
Line
Count
Source
645
126k
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
126k
    return IsEmpty() ? default_value : Local<S>(local_);
647
126k
  }
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
16
  V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
646
16
    return IsEmpty() ? default_value : Local<S>(local_);
647
16
  }
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
23.3M
      : EscapableHandleScopeBase(isolate) {}
714
  V8_INLINE ~EscapableHandleScope() = default;
715
  template <class T>
716
23.3M
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
23.3M
    if (value.IsEmpty()) return value;
721
23.2M
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
23.3M
#endif
723
23.3M
  }
v8::Local<v8::Object> v8::EscapableHandleScope::Escape<v8::Object>(v8::Local<v8::Object>)
Line
Count
Source
716
5.06M
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
5.06M
    if (value.IsEmpty()) return value;
721
5.06M
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
5.06M
#endif
723
5.06M
  }
v8::Local<v8::Array> v8::EscapableHandleScope::Escape<v8::Array>(v8::Local<v8::Array>)
Line
Count
Source
716
5.07M
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
5.07M
    if (value.IsEmpty()) return value;
721
5.07M
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
5.07M
#endif
723
5.07M
  }
v8::Local<v8::Value> v8::EscapableHandleScope::Escape<v8::Value>(v8::Local<v8::Value>)
Line
Count
Source
716
1.26M
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
1.26M
    if (value.IsEmpty()) return value;
721
1.18M
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
1.26M
#endif
723
1.26M
  }
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
11.8M
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
11.8M
    if (value.IsEmpty()) return value;
721
11.8M
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
11.8M
#endif
723
11.8M
  }
v8::Local<v8::Context> v8::EscapableHandleScope::Escape<v8::Context>(v8::Local<v8::Context>)
Line
Count
Source
716
1.03k
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
1.03k
    if (value.IsEmpty()) return value;
721
1.03k
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
1.03k
#endif
723
1.03k
  }
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
152
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
152
    if (value.IsEmpty()) return value;
721
152
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
152
#endif
723
152
  }
v8::Local<v8::Map> v8::EscapableHandleScope::Escape<v8::Map>(v8::Local<v8::Map>)
Line
Count
Source
716
126k
  V8_INLINE Local<T> Escape(Local<T> value) {
717
#ifdef V8_ENABLE_DIRECT_LOCAL
718
    return value;
719
#else
720
126k
    if (value.IsEmpty()) return value;
721
126k
    return Local<T>::FromSlot(EscapeSlot(value.slot()));
722
126k
#endif
723
126k
  }
724
725
  template <class T>
726
1.14M
  V8_INLINE MaybeLocal<T> EscapeMaybe(MaybeLocal<T> value) {
727
1.14M
    return Escape(value.FromMaybe(Local<T>()));
728
1.14M
  }
v8::MaybeLocal<v8::Value> v8::EscapableHandleScope::EscapeMaybe<v8::Value>(v8::MaybeLocal<v8::Value>)
Line
Count
Source
726
1.14M
  V8_INLINE MaybeLocal<T> EscapeMaybe(MaybeLocal<T> value) {
727
1.14M
    return Escape(value.FromMaybe(Local<T>()));
728
1.14M
  }
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_