/src/node/deps/v8/include/v8-local-handle.h
Line | Count | Source |
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 ArrayBuffer; |
46 | | class Boolean; |
47 | | class Context; |
48 | | class EscapableHandleScope; |
49 | | template <class F> |
50 | | class FunctionCallbackInfo; |
51 | | class Isolate; |
52 | | class Object; |
53 | | template <class F1, class F2, class F3> |
54 | | class PersistentValueMapBase; |
55 | | class Primitive; |
56 | | class Private; |
57 | | template <class F> |
58 | | class PropertyCallbackInfo; |
59 | | template <class F> |
60 | | class ReturnValue; |
61 | | class String; |
62 | | template <class F> |
63 | | class Traced; |
64 | | class TypecheckWitness; |
65 | | class Utils; |
66 | | class Uint32; |
67 | | class Value; |
68 | | |
69 | | namespace debug { |
70 | | class ConsoleCallArguments; |
71 | | } |
72 | | |
73 | | namespace internal { |
74 | | template <typename T> |
75 | | class CustomArguments; |
76 | | template <typename T> |
77 | | class LocalUnchecked; |
78 | | class SamplingHeapProfiler; |
79 | | } // namespace internal |
80 | | |
81 | | namespace api_internal { |
82 | | // Called when ToLocalChecked is called on an empty Local. |
83 | | V8_EXPORT void ToLocalEmpty(); |
84 | | |
85 | | #ifdef V8_ENABLE_CHECKS |
86 | | template <typename T, typename V = Value> |
87 | | void TypeCheckLocal(V* value) { |
88 | | // If `T` does not provide a `Cast` method we cannot check anything. |
89 | | if constexpr (requires { T::Cast(value); }) { |
90 | | // TODO(419454582): Remove all these exceptions. |
91 | | if (std::is_same_v<Array, T> && value->IsArgumentsObject()) return; |
92 | | if (std::is_same_v<ArrayBuffer, T> && value->IsSharedArrayBuffer()) return; |
93 | | if (std::is_same_v<Object, T> && value->IsNull()) return; |
94 | | if (std::is_same_v<Object, T> && value->IsString()) return; |
95 | | if (std::is_same_v<Object, T> && value->IsUndefined()) return; |
96 | | if (std::is_same_v<Uint32, T> && value->IsInt32()) return; |
97 | | if (std::is_same_v<Object, T> && value->IsNumber()) return; |
98 | | // Execute the actual check (part of the cast). |
99 | | T::Cast(value); |
100 | | } |
101 | | } |
102 | | #endif |
103 | | } // namespace api_internal |
104 | | |
105 | | /** |
106 | | * A stack-allocated class that governs a number of local handles. |
107 | | * After a handle scope has been created, all local handles will be |
108 | | * allocated within that handle scope until either the handle scope is |
109 | | * deleted or another handle scope is created. If there is already a |
110 | | * handle scope and a new one is created, all allocations will take |
111 | | * place in the new handle scope until it is deleted. After that, |
112 | | * new handles will again be allocated in the original handle scope. |
113 | | * |
114 | | * After the handle scope of a local handle has been deleted the |
115 | | * garbage collector will no longer track the object stored in the |
116 | | * handle and may deallocate it. The behavior of accessing a handle |
117 | | * for which the handle scope has been deleted is undefined. |
118 | | */ |
119 | | class V8_EXPORT V8_NODISCARD HandleScope { |
120 | | public: |
121 | | V8_INLINE explicit HandleScope(Isolate* isolate); |
122 | | |
123 | | V8_INLINE ~HandleScope(); |
124 | | |
125 | | /** |
126 | | * Counts the number of allocated handles. |
127 | | */ |
128 | | static int NumberOfHandles(Isolate* isolate); |
129 | | |
130 | 0 | V8_INLINE Isolate* GetIsolate() const { return isolate_; } |
131 | | |
132 | | HandleScope(const HandleScope&) = delete; |
133 | | void operator=(const HandleScope&) = delete; |
134 | | |
135 | | static internal::Address* CreateHandleForCurrentIsolate( |
136 | | internal::Address value); |
137 | | |
138 | | protected: |
139 | | V8_INLINE HandleScope() = default; |
140 | | |
141 | | V8_INLINE void Initialize(Isolate* isolate); |
142 | | |
143 | | V8_INLINE static internal::Address* CreateHandle(Isolate* i_isolate, |
144 | | internal::Address value); |
145 | | |
146 | | private: |
147 | | // Extend the HandleScope making room for more handles. Not inlined. |
148 | | static internal::Address* Extend(Isolate* isolate); |
149 | | // Delete any extensions in HandleScope destructor. Not called unless there |
150 | | // are extensions. Not inlined. |
151 | | void DeleteExtensions(Isolate* isolate); |
152 | | |
153 | | #ifdef V8_ENABLE_CHECKS |
154 | | // Non-inlined asserts on HandleScope constructor. |
155 | | void DoInitializeAsserts(Isolate* isolate); |
156 | | // Non-inlined assert for HandleScope destructor. |
157 | | void AssertScopeLevelsMatch(); |
158 | | // Non-inlined asserts for HandleScope destructor. Also zaps the slots |
159 | | // if this is enabled. |
160 | | void DoCloseScopeAsserts(int before, internal::Address* limit, |
161 | | internal::HandleScopeData* current); |
162 | | #endif |
163 | | |
164 | | // Declaring operator new and delete as deleted is not spec compliant. |
165 | | // Therefore declare them private instead to disable dynamic alloc |
166 | | void* operator new(size_t size); |
167 | | void* operator new[](size_t size); |
168 | | void operator delete(void*, size_t); |
169 | | void operator delete[](void*, size_t); |
170 | | |
171 | | Isolate* isolate_; |
172 | | internal::Address* prev_next_; |
173 | | internal::Address* prev_limit_; |
174 | | #ifdef V8_ENABLE_CHECKS |
175 | | int scope_level_ = 0; |
176 | | #endif |
177 | | |
178 | | // LocalBase<T>::New uses CreateHandle with an Isolate* parameter. |
179 | | template <typename T> |
180 | | friend class LocalBase; |
181 | | |
182 | | // Object::GetInternalField and Context::GetEmbedderData use CreateHandle with |
183 | | // a HeapObject in their shortcuts. |
184 | | friend class Object; |
185 | | friend class Context; |
186 | | }; |
187 | | |
188 | 3.88M | HandleScope::HandleScope(Isolate* v8_isolate) { Initialize(v8_isolate); } |
189 | | |
190 | 3.88M | void HandleScope::Initialize(Isolate* v8_isolate) { |
191 | 3.88M | using I = internal::Internals; |
192 | 3.88M | internal::HandleScopeData* current = I::GetHandleScopeData(v8_isolate); |
193 | 3.88M | isolate_ = v8_isolate; |
194 | 3.88M | prev_next_ = current->next; |
195 | 3.88M | prev_limit_ = current->limit; |
196 | 3.88M | current->level++; |
197 | | #ifdef V8_ENABLE_CHECKS |
198 | | DoInitializeAsserts(v8_isolate); |
199 | | scope_level_ = current->level; |
200 | | #endif |
201 | 3.88M | } |
202 | | |
203 | 3.89M | HandleScope::~HandleScope() { |
204 | 3.89M | if (V8_UNLIKELY(isolate_ == nullptr)) return; |
205 | | #ifdef V8_ENABLE_CHECKS |
206 | | AssertScopeLevelsMatch(); |
207 | | int handle_count_before = NumberOfHandles(isolate_); |
208 | | #endif |
209 | | |
210 | 3.89M | using I = internal::Internals; |
211 | 3.89M | internal::HandleScopeData* current = I::GetHandleScopeData(isolate_); |
212 | 3.89M | std::swap(current->next, prev_next_); |
213 | 3.89M | current->level--; |
214 | 3.89M | internal::Address* limit = prev_next_; |
215 | 3.89M | if (V8_UNLIKELY(current->limit != prev_limit_)) { |
216 | 25.3k | current->limit = prev_limit_; |
217 | 25.3k | limit = prev_limit_; |
218 | 25.3k | DeleteExtensions(isolate_); |
219 | 25.3k | } |
220 | | #ifdef V8_ENABLE_CHECKS |
221 | | DoCloseScopeAsserts(handle_count_before, limit, current); |
222 | | #else |
223 | 3.89M | (void)limit; // Avoid unused variable warning. |
224 | 3.89M | #endif |
225 | 3.89M | } |
226 | | |
227 | | internal::Address* HandleScope::CreateHandle(Isolate* v8_isolate, |
228 | 810k | internal::Address value) { |
229 | 810k | using I = internal::Internals; |
230 | 810k | internal::HandleScopeData* data = I::GetHandleScopeData(v8_isolate); |
231 | 810k | internal::Address* result = data->next; |
232 | 810k | if (V8_UNLIKELY(result == data->limit)) { |
233 | 25.1k | result = Extend(v8_isolate); |
234 | 25.1k | } |
235 | | // Update the current next field, set the value in the created handle, |
236 | | // and return the result. |
237 | 810k | data->next = reinterpret_cast<internal::Address*>( |
238 | 810k | reinterpret_cast<internal::Address>(result) + sizeof(internal::Address)); |
239 | 810k | *result = value; |
240 | 810k | return result; |
241 | 810k | } |
242 | | |
243 | | /** |
244 | | * A base class for local handles. |
245 | | * Its implementation depends on whether direct handle support is enabled. |
246 | | * When it is, a local handle contains a direct pointer to the referenced |
247 | | * object, otherwise it contains an indirect pointer. |
248 | | */ |
249 | | #ifdef V8_ENABLE_DIRECT_HANDLE |
250 | | |
251 | | template <typename T> |
252 | | class LocalBase : public api_internal::DirectHandleBase { |
253 | | protected: |
254 | | template <class F> |
255 | | friend class Local; |
256 | | |
257 | | V8_INLINE LocalBase() = default; |
258 | | |
259 | | V8_INLINE explicit LocalBase(internal::Address ptr) : DirectHandleBase(ptr) { |
260 | | #ifdef V8_ENABLE_CHECKS |
261 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); |
262 | | #endif |
263 | | } |
264 | | |
265 | | template <typename S> |
266 | | V8_INLINE LocalBase(const LocalBase<S>& other) : DirectHandleBase(other) {} |
267 | | |
268 | | V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) { |
269 | | return LocalBase<T>(value); |
270 | | } |
271 | | |
272 | | V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) { |
273 | | return LocalBase<T>::New(isolate, |
274 | | internal::ValueHelper::ValueAsAddress(that)); |
275 | | } |
276 | | |
277 | | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { |
278 | | if (slot == nullptr) return LocalBase<T>(); |
279 | | return LocalBase<T>(*slot); |
280 | | } |
281 | | |
282 | | V8_INLINE static LocalBase<T> FromRepr( |
283 | | internal::ValueHelper::InternalRepresentationType repr) { |
284 | | return LocalBase<T>(repr); |
285 | | } |
286 | | }; |
287 | | |
288 | | #else // !V8_ENABLE_DIRECT_HANDLE |
289 | | |
290 | | template <typename T> |
291 | | class LocalBase : public api_internal::IndirectHandleBase { |
292 | | protected: |
293 | | template <class F> |
294 | | friend class Local; |
295 | | |
296 | 3.06M | V8_INLINE LocalBase() = default; v8::LocalBase<v8::ObjectTemplate>::LocalBase() Line | Count | Source | 296 | 1.22k | V8_INLINE LocalBase() = default; |
v8::LocalBase<v8::Value>::LocalBase() Line | Count | Source | 296 | 1.83M | V8_INLINE LocalBase() = default; |
v8::LocalBase<v8::String>::LocalBase() Line | Count | Source | 296 | 69.7k | V8_INLINE LocalBase() = default; |
v8::LocalBase<v8::Script>::LocalBase() Line | Count | Source | 296 | 9.65k | V8_INLINE LocalBase() = default; |
v8::LocalBase<v8::Context>::LocalBase() Line | Count | Source | 296 | 2 | V8_INLINE LocalBase() = default; |
v8::LocalBase<v8::Function>::LocalBase() Line | Count | Source | 296 | 5.39k | V8_INLINE LocalBase() = default; |
v8::LocalBase<v8::Object>::LocalBase() Line | Count | Source | 296 | 1.03M | V8_INLINE LocalBase() = default; |
v8::LocalBase<v8::FunctionTemplate>::LocalBase() Line | Count | Source | 296 | 1.29k | V8_INLINE LocalBase() = default; |
v8::LocalBase<v8::Signature>::LocalBase() Line | Count | Source | 296 | 12.0k | V8_INLINE LocalBase() = default; |
Unexecuted instantiation: v8::LocalBase<v8::Uint32Array>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Float64Array>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Private>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Symbol>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::DictionaryTemplate>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Array>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Int32Array>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Uint8Array>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Module>::LocalBase() v8::LocalBase<v8::Name>::LocalBase() Line | Count | Source | 296 | 91.0k | V8_INLINE LocalBase() = default; |
Unexecuted instantiation: v8::LocalBase<v8::Promise::Resolver>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Promise>::LocalBase() v8::LocalBase<v8::Data>::LocalBase() Line | Count | Source | 296 | 7.77k | V8_INLINE LocalBase() = default; |
v8::LocalBase<v8::ArrayBuffer>::LocalBase() Line | Count | Source | 296 | 35 | V8_INLINE LocalBase() = default; |
Unexecuted instantiation: v8::LocalBase<v8::PrimitiveArray>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Boolean>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::ArrayBufferView>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::UnboundScript>::LocalBase() v8::LocalBase<v8::Message>::LocalBase() Line | Count | Source | 296 | 35 | V8_INLINE LocalBase() = default; |
Unexecuted instantiation: v8::LocalBase<v8::BigInt64Array>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::StackTrace>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::RegExp>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::SharedArrayBuffer>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::WasmMemoryObject>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Map>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Number>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::TypedArray>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Uint32>::LocalBase() Unexecuted instantiation: v8::LocalBase<v8::Int32>::LocalBase() |
297 | | |
298 | | V8_INLINE explicit LocalBase(internal::Address* location) |
299 | 865k | : IndirectHandleBase(location) { |
300 | | #ifdef V8_ENABLE_CHECKS |
301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); |
302 | | #endif |
303 | 865k | } v8::LocalBase<v8::Context>::LocalBase(unsigned long*) Line | Count | Source | 299 | 24.9k | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 24.9k | } |
v8::LocalBase<v8::Value>::LocalBase(unsigned long*) Line | Count | Source | 299 | 801k | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 801k | } |
v8::LocalBase<v8::Primitive>::LocalBase(unsigned long*) Line | Count | Source | 299 | 2.24k | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 2.24k | } |
v8::LocalBase<v8::Boolean>::LocalBase(unsigned long*) Line | Count | Source | 299 | 8.85k | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 8.85k | } |
v8::LocalBase<v8::Private>::LocalBase(unsigned long*) Line | Count | Source | 299 | 1.43k | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 1.43k | } |
v8::LocalBase<v8::Symbol>::LocalBase(unsigned long*) Line | Count | Source | 299 | 2.38k | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 2.38k | } |
v8::LocalBase<v8::String>::LocalBase(unsigned long*) Line | Count | Source | 299 | 16.3k | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 16.3k | } |
v8::LocalBase<v8::Object>::LocalBase(unsigned long*) Line | Count | Source | 299 | 1.68k | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 1.68k | } |
v8::LocalBase<v8::FunctionTemplate>::LocalBase(unsigned long*) Line | Count | Source | 299 | 700 | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 700 | } |
v8::LocalBase<v8::Uint32Array>::LocalBase(unsigned long*) Line | Count | Source | 299 | 245 | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 245 | } |
v8::LocalBase<v8::Float64Array>::LocalBase(unsigned long*) Line | Count | Source | 299 | 175 | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 175 | } |
v8::LocalBase<v8::DictionaryTemplate>::LocalBase(unsigned long*) Line | Count | Source | 299 | 35 | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 35 | } |
v8::LocalBase<v8::ObjectTemplate>::LocalBase(unsigned long*) Line | Count | Source | 299 | 1.26k | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 1.26k | } |
v8::LocalBase<v8::Function>::LocalBase(unsigned long*) Line | Count | Source | 299 | 35 | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 35 | } |
v8::LocalBase<v8::Int32Array>::LocalBase(unsigned long*) Line | Count | Source | 299 | 70 | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 70 | } |
v8::LocalBase<v8::Uint8Array>::LocalBase(unsigned long*) Line | Count | Source | 299 | 140 | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 140 | } |
v8::LocalBase<v8::Array>::LocalBase(unsigned long*) Line | Count | Source | 299 | 700 | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 700 | } |
v8::LocalBase<v8::Data>::LocalBase(unsigned long*) Line | Count | Source | 299 | 2.59k | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 2.59k | } |
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*) Unexecuted instantiation: v8::LocalBase<v8::UnboundScript>::LocalBase(unsigned long*) v8::LocalBase<v8::BigInt64Array>::LocalBase(unsigned long*) Line | Count | Source | 299 | 70 | : IndirectHandleBase(location) { | 300 | | #ifdef V8_ENABLE_CHECKS | 301 | | if (!IsEmpty()) api_internal::TypeCheckLocal<T>(value<Value>()); | 302 | | #endif | 303 | 70 | } |
Unexecuted instantiation: v8::LocalBase<v8::StackTrace>::LocalBase(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Integer>::LocalBase(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Promise::Resolver>::LocalBase(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Map>::LocalBase(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::RegExp>::LocalBase(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::WasmMemoryObject>::LocalBase(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::ArrayBufferView>::LocalBase(unsigned long*) |
304 | | |
305 | | template <typename S> |
306 | 3.95M | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {}v8::LocalBase<v8::Function>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Line | Count | Source | 306 | 3.57k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Name>::LocalBase<v8::String>(v8::LocalBase<v8::String> const&) Line | Count | Source | 306 | 130k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::String>(v8::LocalBase<v8::String> const&) Line | Count | Source | 306 | 223k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Primitive>(v8::LocalBase<v8::Primitive> const&) Line | Count | Source | 306 | 2.24k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Object>(v8::LocalBase<v8::Object> const&) Line | Count | Source | 306 | 47.5k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Object>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Line | Count | Source | 306 | 47.2k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Array>(v8::LocalBase<v8::Array> const&) Line | Count | Source | 306 | 15.9k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Boolean>(v8::LocalBase<v8::Boolean> const&) Line | Count | Source | 306 | 8.82k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Function>(v8::LocalBase<v8::Function> const&) Line | Count | Source | 306 | 5.35k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Data>::LocalBase<v8::Private>(v8::LocalBase<v8::Private> const&) Line | Count | Source | 306 | 1.40k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Data>::LocalBase<v8::Symbol>(v8::LocalBase<v8::Symbol> const&) Line | Count | Source | 306 | 805 | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Integer>(v8::LocalBase<v8::Integer> const&) Line | Count | Source | 306 | 4.20k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::FunctionTemplate>(v8::LocalBase<v8::FunctionTemplate> const&) Line | Count | Source | 306 | 280 | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Number>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Line | Count | Source | 306 | 35 | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Number>(v8::LocalBase<v8::Number> const&) Line | Count | Source | 306 | 17.8k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Symbol>(v8::LocalBase<v8::Symbol> const&) Line | Count | Source | 306 | 16.7k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Template>::LocalBase<v8::ObjectTemplate>(v8::LocalBase<v8::ObjectTemplate> const&) Line | Count | Source | 306 | 6.61k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Uint32Array>(v8::LocalBase<v8::Uint32Array> const&) Line | Count | Source | 306 | 245 | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Float64Array>(v8::LocalBase<v8::Float64Array> const&) Line | Count | Source | 306 | 175 | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::DictionaryTemplate>(v8::LocalBase<v8::DictionaryTemplate> const&) Line | Count | Source | 306 | 35 | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::ObjectTemplate>(v8::LocalBase<v8::ObjectTemplate> const&) Line | Count | Source | 306 | 1.22k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Private>(v8::LocalBase<v8::Private> const&) Line | Count | Source | 306 | 2.80k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Int32Array>(v8::LocalBase<v8::Int32Array> const&) Line | Count | Source | 306 | 70 | 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::Value>::LocalBase<v8::Uint8Array>(v8::LocalBase<v8::Uint8Array> const&) Line | Count | Source | 306 | 70 | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
Unexecuted instantiation: v8::LocalBase<v8::Uint32>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) v8::LocalBase<v8::Data>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Line | Count | Source | 306 | 1.52M | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Value>::LocalBase<v8::Data>(v8::LocalBase<v8::Data> const&) Line | Count | Source | 306 | 1.52M | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Array>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Line | Count | Source | 306 | 1.05k | 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&) v8::LocalBase<v8::Value>::LocalBase<v8::Name>(v8::LocalBase<v8::Name> const&) Line | Count | Source | 306 | 91.0k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
Unexecuted instantiation: v8::LocalBase<v8::Data>::LocalBase<v8::Module>(v8::LocalBase<v8::Module> const&) Unexecuted instantiation: v8::LocalBase<v8::Data>::LocalBase<v8::Primitive>(v8::LocalBase<v8::Primitive> const&) Unexecuted instantiation: v8::LocalBase<v8::Data>::LocalBase<v8::Object>(v8::LocalBase<v8::Object> const&) v8::LocalBase<v8::Primitive>::LocalBase<v8::Symbol>(v8::LocalBase<v8::Symbol> const&) Line | Count | Source | 306 | 35 | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::String>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Line | Count | Source | 306 | 233k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
Unexecuted instantiation: v8::LocalBase<v8::Int32>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Unexecuted instantiation: v8::LocalBase<v8::Symbol>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) v8::LocalBase<v8::ArrayBufferView>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Line | Count | Source | 306 | 35 | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::Data>::LocalBase<v8::PrimitiveArray>(v8::LocalBase<v8::PrimitiveArray> const&) Line | Count | Source | 306 | 35 | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
Unexecuted instantiation: v8::LocalBase<v8::ModuleRequest>::LocalBase<v8::Data>(v8::LocalBase<v8::Data> const&) Unexecuted instantiation: v8::LocalBase<v8::Data>::LocalBase<v8::Array>(v8::LocalBase<v8::Array> const&) Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::Promise>(v8::LocalBase<v8::Promise> const&) Unexecuted instantiation: v8::LocalBase<v8::ArrayBuffer>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Unexecuted instantiation: v8::LocalBase<v8::Object>::LocalBase<v8::Uint8Array>(v8::LocalBase<v8::Uint8Array> const&) Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::ArrayBuffer>(v8::LocalBase<v8::ArrayBuffer> const&) Unexecuted instantiation: v8::LocalBase<v8::SharedArrayBuffer>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Unexecuted instantiation: v8::LocalBase<v8::Integer>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Unexecuted instantiation: v8::LocalBase<v8::ArrayBufferView>::LocalBase<v8::Object>(v8::LocalBase<v8::Object> const&) v8::LocalBase<v8::Data>::LocalBase<v8::Function>(v8::LocalBase<v8::Function> const&) Line | Count | Source | 306 | 2.59k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
Unexecuted instantiation: v8::LocalBase<v8::Module>::LocalBase<v8::Data>(v8::LocalBase<v8::Data> const&) v8::LocalBase<v8::Function>::LocalBase<v8::Data>(v8::LocalBase<v8::Data> const&) Line | Count | Source | 306 | 2.48k | 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 | 306 | 9.59k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
Unexecuted instantiation: v8::LocalBase<v8::Name>::LocalBase<v8::Symbol>(v8::LocalBase<v8::Symbol> const&) v8::LocalBase<v8::Boolean>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Line | Count | Source | 306 | 105 | 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 | 306 | 70 | 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::Name>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Line | Count | Source | 306 | 26.6k | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
v8::LocalBase<v8::String>::LocalBase<v8::Name>(v8::LocalBase<v8::Name> const&) Line | Count | Source | 306 | 280 | 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 | 306 | 770 | 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&) v8::LocalBase<v8::Data>::LocalBase<v8::String>(v8::LocalBase<v8::String> const&) Line | Count | Source | 306 | 140 | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
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&) Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::External>(v8::LocalBase<v8::External> const&) Unexecuted instantiation: v8::LocalBase<v8::External>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::Map>(v8::LocalBase<v8::Map> const&) 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::Array>::LocalBase<v8::Object>(v8::LocalBase<v8::Object> const&) Unexecuted instantiation: v8::LocalBase<v8::Proxy>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) 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&) Unexecuted instantiation: v8::LocalBase<v8::Uint32Array>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) v8::LocalBase<v8::Data>::LocalBase<v8::Boolean>(v8::LocalBase<v8::Boolean> const&) Line | Count | Source | 306 | 35 | V8_INLINE LocalBase(const LocalBase<S>& other) : IndirectHandleBase(other) {} |
Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::BigInt>(v8::LocalBase<v8::BigInt> const&) Unexecuted instantiation: v8::LocalBase<v8::Uint8Array>::LocalBase<v8::Object>(v8::LocalBase<v8::Object> const&) Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::ArrayBufferView>(v8::LocalBase<v8::ArrayBufferView> const&) Unexecuted instantiation: v8::LocalBase<v8::Object>::LocalBase<v8::Array>(v8::LocalBase<v8::Array> const&) Unexecuted instantiation: v8::LocalBase<v8::Map>::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::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::TypedArray>::LocalBase<v8::Float16Array>(v8::LocalBase<v8::Float16Array> 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::DataView>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Unexecuted instantiation: v8::LocalBase<v8::Date>::LocalBase<v8::Value>(v8::LocalBase<v8::Value> const&) Unexecuted instantiation: v8::LocalBase<v8::Value>::LocalBase<v8::Int32>(v8::LocalBase<v8::Int32> const&) |
307 | | |
308 | 810k | V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) { |
309 | 810k | return LocalBase(HandleScope::CreateHandle(isolate, value)); |
310 | 810k | } Unexecuted instantiation: v8::LocalBase<v8::Data>::New(v8::Isolate*, unsigned long) v8::LocalBase<v8::Value>::New(v8::Isolate*, unsigned long) Line | Count | Source | 308 | 784k | V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) { | 309 | 784k | return LocalBase(HandleScope::CreateHandle(isolate, value)); | 310 | 784k | } |
v8::LocalBase<v8::Context>::New(v8::Isolate*, unsigned long) Line | Count | Source | 308 | 24.9k | V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) { | 309 | 24.9k | return LocalBase(HandleScope::CreateHandle(isolate, value)); | 310 | 24.9k | } |
v8::LocalBase<v8::Object>::New(v8::Isolate*, unsigned long) Line | Count | Source | 308 | 280 | V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) { | 309 | 280 | return LocalBase(HandleScope::CreateHandle(isolate, value)); | 310 | 280 | } |
Unexecuted instantiation: v8::LocalBase<v8::Int8Array>::New(v8::Isolate*, unsigned long) v8::LocalBase<v8::Uint8Array>::New(v8::Isolate*, unsigned long) Line | Count | Source | 308 | 140 | V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) { | 309 | 140 | return LocalBase(HandleScope::CreateHandle(isolate, value)); | 310 | 140 | } |
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 | 308 | 70 | V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) { | 309 | 70 | return LocalBase(HandleScope::CreateHandle(isolate, value)); | 310 | 70 | } |
v8::LocalBase<v8::Uint32Array>::New(v8::Isolate*, unsigned long) Line | Count | Source | 308 | 245 | V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) { | 309 | 245 | return LocalBase(HandleScope::CreateHandle(isolate, value)); | 310 | 245 | } |
Unexecuted instantiation: v8::LocalBase<v8::Float32Array>::New(v8::Isolate*, unsigned long) v8::LocalBase<v8::Float64Array>::New(v8::Isolate*, unsigned long) Line | Count | Source | 308 | 175 | V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) { | 309 | 175 | return LocalBase(HandleScope::CreateHandle(isolate, value)); | 310 | 175 | } |
v8::LocalBase<v8::BigInt64Array>::New(v8::Isolate*, unsigned long) Line | Count | Source | 308 | 70 | V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) { | 309 | 70 | return LocalBase(HandleScope::CreateHandle(isolate, value)); | 310 | 70 | } |
Unexecuted instantiation: v8::LocalBase<v8::Function>::New(v8::Isolate*, unsigned long) Unexecuted instantiation: v8::LocalBase<v8::Array>::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) Unexecuted instantiation: v8::LocalBase<v8::UnboundScript>::New(v8::Isolate*, unsigned long) Unexecuted instantiation: v8::LocalBase<v8::Promise>::New(v8::Isolate*, unsigned long) Unexecuted instantiation: v8::LocalBase<v8::Promise::Resolver>::New(v8::Isolate*, unsigned long) Unexecuted instantiation: v8::LocalBase<v8::RegExp>::New(v8::Isolate*, unsigned long) Unexecuted instantiation: v8::LocalBase<v8::WasmMemoryObject>::New(v8::Isolate*, unsigned long) Unexecuted instantiation: v8::LocalBase<v8::Map>::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) |
311 | | |
312 | 810k | V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) { |
313 | 810k | if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>(); |
314 | 810k | return LocalBase<T>::New(isolate, |
315 | 810k | internal::ValueHelper::ValueAsAddress(that)); |
316 | 810k | } Unexecuted instantiation: v8::LocalBase<v8::Data>::New(v8::Isolate*, v8::Data*) v8::LocalBase<v8::Context>::New(v8::Isolate*, v8::Context*) Line | Count | Source | 312 | 24.9k | V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) { | 313 | 24.9k | if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>(); | 314 | 24.9k | return LocalBase<T>::New(isolate, | 315 | 24.9k | internal::ValueHelper::ValueAsAddress(that)); | 316 | 24.9k | } |
v8::LocalBase<v8::Object>::New(v8::Isolate*, v8::Object*) Line | Count | Source | 312 | 280 | V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) { | 313 | 280 | if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>(); | 314 | 280 | return LocalBase<T>::New(isolate, | 315 | 280 | internal::ValueHelper::ValueAsAddress(that)); | 316 | 280 | } |
Unexecuted instantiation: v8::LocalBase<v8::Int8Array>::New(v8::Isolate*, v8::Int8Array*) v8::LocalBase<v8::Uint8Array>::New(v8::Isolate*, v8::Uint8Array*) Line | Count | Source | 312 | 140 | V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) { | 313 | 140 | if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>(); | 314 | 140 | return LocalBase<T>::New(isolate, | 315 | 140 | internal::ValueHelper::ValueAsAddress(that)); | 316 | 140 | } |
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 | 312 | 70 | V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) { | 313 | 70 | if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>(); | 314 | 70 | return LocalBase<T>::New(isolate, | 315 | 70 | internal::ValueHelper::ValueAsAddress(that)); | 316 | 70 | } |
v8::LocalBase<v8::Uint32Array>::New(v8::Isolate*, v8::Uint32Array*) Line | Count | Source | 312 | 245 | V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) { | 313 | 245 | if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>(); | 314 | 245 | return LocalBase<T>::New(isolate, | 315 | 245 | internal::ValueHelper::ValueAsAddress(that)); | 316 | 245 | } |
Unexecuted instantiation: v8::LocalBase<v8::Float32Array>::New(v8::Isolate*, v8::Float32Array*) v8::LocalBase<v8::Float64Array>::New(v8::Isolate*, v8::Float64Array*) Line | Count | Source | 312 | 175 | V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) { | 313 | 175 | if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>(); | 314 | 175 | return LocalBase<T>::New(isolate, | 315 | 175 | internal::ValueHelper::ValueAsAddress(that)); | 316 | 175 | } |
v8::LocalBase<v8::BigInt64Array>::New(v8::Isolate*, v8::BigInt64Array*) Line | Count | Source | 312 | 70 | V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) { | 313 | 70 | if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>(); | 314 | 70 | return LocalBase<T>::New(isolate, | 315 | 70 | internal::ValueHelper::ValueAsAddress(that)); | 316 | 70 | } |
v8::LocalBase<v8::Value>::New(v8::Isolate*, v8::Value*) Line | Count | Source | 312 | 784k | V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) { | 313 | 784k | if (internal::ValueHelper::IsEmpty(that)) return LocalBase<T>(); | 314 | 784k | return LocalBase<T>::New(isolate, | 315 | 784k | internal::ValueHelper::ValueAsAddress(that)); | 316 | 784k | } |
Unexecuted instantiation: v8::LocalBase<v8::Function>::New(v8::Isolate*, v8::Function*) Unexecuted instantiation: v8::LocalBase<v8::Array>::New(v8::Isolate*, v8::Array*) Unexecuted instantiation: v8::LocalBase<v8::Module>::New(v8::Isolate*, v8::Module*) Unexecuted instantiation: v8::LocalBase<v8::ArrayBuffer>::New(v8::Isolate*, v8::ArrayBuffer*) Unexecuted instantiation: v8::LocalBase<v8::UnboundScript>::New(v8::Isolate*, v8::UnboundScript*) Unexecuted instantiation: v8::LocalBase<v8::Promise>::New(v8::Isolate*, v8::Promise*) Unexecuted instantiation: v8::LocalBase<v8::Promise::Resolver>::New(v8::Isolate*, v8::Promise::Resolver*) Unexecuted instantiation: v8::LocalBase<v8::RegExp>::New(v8::Isolate*, v8::RegExp*) Unexecuted instantiation: v8::LocalBase<v8::WasmMemoryObject>::New(v8::Isolate*, v8::WasmMemoryObject*) Unexecuted instantiation: v8::LocalBase<v8::Map>::New(v8::Isolate*, v8::Map*) Unexecuted instantiation: v8::LocalBase<v8::ArrayBufferView>::New(v8::Isolate*, v8::ArrayBufferView*) Unexecuted instantiation: v8::LocalBase<v8::FunctionTemplate>::New(v8::Isolate*, v8::FunctionTemplate*) |
317 | | |
318 | 54.9k | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { |
319 | 54.9k | return LocalBase<T>(slot); |
320 | 54.9k | } v8::LocalBase<v8::String>::FromSlot(unsigned long*) Line | Count | Source | 318 | 16.3k | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 16.3k | return LocalBase<T>(slot); | 320 | 16.3k | } |
v8::LocalBase<v8::Primitive>::FromSlot(unsigned long*) Line | Count | Source | 318 | 2.24k | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 2.24k | return LocalBase<T>(slot); | 320 | 2.24k | } |
v8::LocalBase<v8::Boolean>::FromSlot(unsigned long*) Line | Count | Source | 318 | 8.85k | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 8.85k | return LocalBase<T>(slot); | 320 | 8.85k | } |
v8::LocalBase<v8::Value>::FromSlot(unsigned long*) Line | Count | Source | 318 | 16.9k | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 16.9k | return LocalBase<T>(slot); | 320 | 16.9k | } |
v8::LocalBase<v8::Private>::FromSlot(unsigned long*) Line | Count | Source | 318 | 1.43k | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 1.43k | return LocalBase<T>(slot); | 320 | 1.43k | } |
v8::LocalBase<v8::Symbol>::FromSlot(unsigned long*) Line | Count | Source | 318 | 2.38k | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 2.38k | return LocalBase<T>(slot); | 320 | 2.38k | } |
v8::LocalBase<v8::DictionaryTemplate>::FromSlot(unsigned long*) Line | Count | Source | 318 | 35 | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 35 | return LocalBase<T>(slot); | 320 | 35 | } |
v8::LocalBase<v8::FunctionTemplate>::FromSlot(unsigned long*) Line | Count | Source | 318 | 700 | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 700 | return LocalBase<T>(slot); | 320 | 700 | } |
v8::LocalBase<v8::ObjectTemplate>::FromSlot(unsigned long*) Line | Count | Source | 318 | 1.26k | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 1.26k | return LocalBase<T>(slot); | 320 | 1.26k | } |
v8::LocalBase<v8::Object>::FromSlot(unsigned long*) Line | Count | Source | 318 | 1.40k | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 1.40k | return LocalBase<T>(slot); | 320 | 1.40k | } |
v8::LocalBase<v8::Array>::FromSlot(unsigned long*) Line | Count | Source | 318 | 700 | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 700 | return LocalBase<T>(slot); | 320 | 700 | } |
Unexecuted instantiation: v8::LocalBase<v8::Promise>::FromSlot(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Module>::FromSlot(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Uint8Array>::FromSlot(unsigned long*) v8::LocalBase<v8::Data>::FromSlot(unsigned long*) Line | Count | Source | 318 | 2.59k | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 2.59k | return LocalBase<T>(slot); | 320 | 2.59k | } |
v8::LocalBase<v8::Function>::FromSlot(unsigned long*) Line | Count | Source | 318 | 35 | V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) { | 319 | 35 | return LocalBase<T>(slot); | 320 | 35 | } |
Unexecuted instantiation: v8::LocalBase<v8::Context>::FromSlot(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::StackTrace>::FromSlot(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Integer>::FromSlot(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Map>::FromSlot(unsigned long*) |
321 | | |
322 | | V8_INLINE static LocalBase<T> FromRepr( |
323 | 0 | internal::ValueHelper::InternalRepresentationType repr) { |
324 | 0 | return LocalBase<T>(repr); |
325 | 0 | } Unexecuted instantiation: v8::LocalBase<v8::Private>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Symbol>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::String>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::DictionaryTemplate>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::FunctionTemplate>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::ObjectTemplate>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Uint32Array>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Uint8Array>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Float64Array>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Array>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Object>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Int32Array>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::BigInt64Array>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Function>::FromRepr(unsigned long*) Unexecuted instantiation: v8::LocalBase<v8::Context>::FromRepr(unsigned long*) |
326 | | }; |
327 | | |
328 | | #endif // V8_ENABLE_DIRECT_HANDLE |
329 | | |
330 | | /** |
331 | | * An object reference managed by the v8 garbage collector. |
332 | | * |
333 | | * All objects returned from v8 have to be tracked by the garbage collector so |
334 | | * that it knows that the objects are still alive. Also, because the garbage |
335 | | * collector may move objects, it is unsafe to point directly to an object. |
336 | | * Instead, all objects are stored in handles which are known by the garbage |
337 | | * collector and updated whenever an object moves. Handles should always be |
338 | | * passed by value (except in cases like out-parameters) and they should never |
339 | | * be allocated on the heap. |
340 | | * |
341 | | * There are two types of handles: local and persistent handles. |
342 | | * |
343 | | * Local handles are light-weight and transient and typically used in local |
344 | | * operations. They are managed by HandleScopes. That means that a HandleScope |
345 | | * must exist on the stack when they are created and that they are only valid |
346 | | * inside of the HandleScope active during their creation. For passing a local |
347 | | * handle to an outer HandleScope, an EscapableHandleScope and its Escape() |
348 | | * method must be used. |
349 | | * |
350 | | * Persistent handles can be used when storing objects across several |
351 | | * independent operations and have to be explicitly deallocated when they're no |
352 | | * longer used. |
353 | | * |
354 | | * It is safe to extract the object stored in the handle by dereferencing the |
355 | | * handle (for instance, to extract the Object* from a Local<Object>); the value |
356 | | * will still be governed by a handle behind the scenes and the same rules apply |
357 | | * to these values as to their handles. |
358 | | */ |
359 | | template <class T> |
360 | | class V8_TRIVIAL_ABI Local : public LocalBase<T>, |
361 | | #ifdef V8_ENABLE_LOCAL_OFF_STACK_CHECK |
362 | | public api_internal::StackAllocated<true> |
363 | | #else |
364 | | public api_internal::StackAllocated<false> |
365 | | #endif |
366 | | { |
367 | | public: |
368 | | /** |
369 | | * Default constructor: Returns an empty handle. |
370 | | */ |
371 | 3.06M | V8_INLINE Local() = default; v8::Local<v8::ObjectTemplate>::Local() Line | Count | Source | 371 | 1.22k | V8_INLINE Local() = default; |
v8::Local<v8::Value>::Local() Line | Count | Source | 371 | 1.83M | V8_INLINE Local() = default; |
v8::Local<v8::String>::Local() Line | Count | Source | 371 | 69.7k | V8_INLINE Local() = default; |
v8::Local<v8::Script>::Local() Line | Count | Source | 371 | 9.65k | V8_INLINE Local() = default; |
v8::Local<v8::Function>::Local() Line | Count | Source | 371 | 5.39k | V8_INLINE Local() = default; |
v8::Local<v8::Context>::Local() Line | Count | Source | 371 | 2 | V8_INLINE Local() = default; |
v8::Local<v8::Object>::Local() Line | Count | Source | 371 | 1.03M | V8_INLINE Local() = default; |
v8::Local<v8::FunctionTemplate>::Local() Line | Count | Source | 371 | 1.29k | V8_INLINE Local() = default; |
v8::Local<v8::Signature>::Local() Line | Count | Source | 371 | 12.0k | V8_INLINE Local() = default; |
Unexecuted instantiation: v8::Local<v8::Private>::Local() Unexecuted instantiation: v8::Local<v8::Symbol>::Local() Unexecuted instantiation: v8::Local<v8::DictionaryTemplate>::Local() Unexecuted instantiation: v8::Local<v8::Array>::Local() Unexecuted instantiation: v8::Local<v8::Uint32Array>::Local() Unexecuted instantiation: v8::Local<v8::Uint8Array>::Local() Unexecuted instantiation: v8::Local<v8::Float64Array>::Local() Unexecuted instantiation: v8::Local<v8::Int32Array>::Local() Unexecuted instantiation: v8::Local<v8::Module>::Local() Unexecuted instantiation: v8::Local<v8::Promise::Resolver>::Local() Unexecuted instantiation: v8::Local<v8::Promise>::Local() v8::Local<v8::Data>::Local() Line | Count | Source | 371 | 7.77k | V8_INLINE Local() = default; |
v8::Local<v8::ArrayBuffer>::Local() Line | Count | Source | 371 | 35 | V8_INLINE Local() = default; |
Unexecuted instantiation: v8::Local<v8::PrimitiveArray>::Local() Unexecuted instantiation: v8::Local<v8::Boolean>::Local() Unexecuted instantiation: v8::Local<v8::ArrayBufferView>::Local() Unexecuted instantiation: v8::Local<v8::UnboundScript>::Local() v8::Local<v8::Message>::Local() Line | Count | Source | 371 | 35 | V8_INLINE Local() = default; |
Unexecuted instantiation: v8::Local<v8::StackTrace>::Local() Unexecuted instantiation: v8::Local<v8::BigInt64Array>::Local() Unexecuted instantiation: v8::Local<v8::RegExp>::Local() Unexecuted instantiation: v8::Local<v8::SharedArrayBuffer>::Local() v8::Local<v8::Name>::Local() Line | Count | Source | 371 | 91.0k | V8_INLINE Local() = default; |
Unexecuted instantiation: v8::Local<v8::Number>::Local() Unexecuted instantiation: v8::Local<v8::TypedArray>::Local() Unexecuted instantiation: v8::Local<v8::Uint32>::Local() Unexecuted instantiation: v8::Local<v8::Int32>::Local() |
372 | | |
373 | | /** |
374 | | * Constructor for handling automatic up casting. |
375 | | * Ex. Local<Object> can be passed when Local<Value> is expected but not |
376 | | * the other way round. |
377 | | */ |
378 | | template <class S> |
379 | | requires std::is_base_of_v<T, S> |
380 | 2.09M | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {}_ZN2v85LocalINS_4NameEEC2INS_6StringEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 130k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_5ValueEEC2INS_6StringEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 210k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_5ValueEEC2INS_9PrimitiveEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 2.24k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_5ValueEEC2INS_6ObjectEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 47.5k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_5ValueEEC2INS_5ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 15.9k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_5ValueEEC2INS_7BooleanEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 8.82k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_5ValueEEC2INS_8FunctionEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 5.32k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_4DataEEC2INS_7PrivateEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 1.40k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_4DataEEC2INS_6SymbolEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 805 | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_5ValueEEC2INS_7IntegerEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 4.20k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_5ValueEEC2INS_6NumberEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 17.8k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_5ValueEEC2INS_6SymbolEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 15.9k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_8TemplateEEC2INS_14ObjectTemplateEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 6.61k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_5ValueEEC2INS_11Uint32ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 245 | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_5ValueEEC2INS_12Float64ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 175 | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_5ValueEEC2INS_4NameEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 91.0k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
Unexecuted instantiation: _ZN2v85LocalINS_4DataEEC2INS_6ModuleEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_4DataEEC2INS_9PrimitiveEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE _ZN2v85LocalINS_4DataEEC2INS_5ValueEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 1.52M | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
Unexecuted instantiation: _ZN2v85LocalINS_4DataEEC2INS_6ObjectEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE _ZN2v85LocalINS_9PrimitiveEEC2INS_6SymbolEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 35 | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_4DataEEC2INS_14PrimitiveArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 35 | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
Unexecuted instantiation: _ZN2v85LocalINS_4DataEEC2INS_5ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_5ValueEEC2INS_7PromiseEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_6ObjectEEC2INS_10Uint8ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_5ValueEEC2INS_11ArrayBufferEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE _ZN2v85LocalINS_4DataEEC2INS_8FunctionEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 2.59k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
Unexecuted instantiation: _ZN2v85LocalINS_5ValueEEC2INS_3SetEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE _ZN2v85LocalINS_4DataEEC2INS_16FunctionTemplateEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 9.59k | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
Unexecuted instantiation: _ZN2v85LocalINS_4NameEEC2INS_6SymbolEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_5ValueEEC2INS_7Promise8ResolverEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS6_EE _ZN2v85LocalINS_5ValueEEC2INS_13BigInt64ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 70 | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_4DataEEC2INS_7IntegerEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 770 | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
Unexecuted instantiation: _ZN2v85LocalINS_4DataEEC2INS_7PromiseEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE _ZN2v85LocalINS_5ValueEEC2INS_10Uint8ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 70 | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
_ZN2v85LocalINS_4DataEEC2INS_6StringEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 140 | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
Unexecuted instantiation: _ZN2v85LocalINS_9PrimitiveEEC2INS_6StringEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_5ValueEEC2INS_8ExternalEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_5ValueEEC2INS_3MapEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE _ZN2v85LocalINS_5ValueEEC2INS_10Int32ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 70 | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
Unexecuted instantiation: _ZN2v85LocalINS_5ValueEEC2INS_17SharedArrayBufferEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_6ObjectEEC2INS_7PromiseEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE _ZN2v85LocalINS_4DataEEC2INS_7BooleanEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Line | Count | Source | 380 | 35 | V8_INLINE Local(Local<S> that) : LocalBase<T>(that) {} |
Unexecuted instantiation: _ZN2v85LocalINS_5ValueEEC2INS_6BigIntEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_6ObjectEEC2INS_5ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_5ValueEEC2INS_8DataViewEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_10TypedArrayEEC2INS_9Int8ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_10TypedArrayEEC2INS_10Uint8ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_10TypedArrayEEC2INS_17Uint8ClampedArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_10TypedArrayEEC2INS_10Int16ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_10TypedArrayEEC2INS_11Uint16ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_10TypedArrayEEC2INS_10Int32ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_10TypedArrayEEC2INS_11Uint32ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_10TypedArrayEEC2INS_12Float32ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_10TypedArrayEEC2INS_12Float64ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_10TypedArrayEEC2INS_13BigInt64ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_10TypedArrayEEC2INS_14BigUint64ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_10TypedArrayEEC2INS_12Float16ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_5ValueEEC2INS_10TypedArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v85LocalINS_5ValueEEC2INS_5Int32EQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE |
381 | | |
382 | 11.9M | V8_INLINE T* operator->() const { return this->template value<T>(); }v8::Local<v8::Value>::operator->() const Line | Count | Source | 382 | 1.77M | V8_INLINE T* operator->() const { return this->template value<T>(); } |
v8::Local<v8::Data>::operator->() const Line | Count | Source | 382 | 5.07k | V8_INLINE T* operator->() const { return this->template value<T>(); } |
v8::Local<v8::Context>::operator->() const Line | Count | Source | 382 | 8.78M | 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 | 382 | 14.7k | V8_INLINE T* operator->() const { return this->template value<T>(); } |
v8::Local<v8::Template>::operator->() const Line | Count | Source | 382 | 6.61k | V8_INLINE T* operator->() const { return this->template value<T>(); } |
v8::Local<v8::Function>::operator->() const Line | Count | Source | 382 | 4.79k | V8_INLINE T* operator->() const { return this->template value<T>(); } |
v8::Local<v8::Object>::operator->() const Line | Count | Source | 382 | 355k | V8_INLINE T* operator->() const { return this->template value<T>(); } |
v8::Local<v8::ObjectTemplate>::operator->() const Line | Count | Source | 382 | 9.17k | V8_INLINE T* operator->() const { return this->template value<T>(); } |
Unexecuted instantiation: v8::Local<v8::Integer>::operator->() const v8::Local<v8::Script>::operator->() const Line | Count | Source | 382 | 10.2k | V8_INLINE T* operator->() const { return this->template value<T>(); } |
v8::Local<v8::Array>::operator->() const Line | Count | Source | 382 | 764k | V8_INLINE T* operator->() const { return this->template value<T>(); } |
v8::Local<v8::Number>::operator->() const Line | Count | Source | 382 | 35 | V8_INLINE T* operator->() const { return this->template value<T>(); } |
v8::Local<v8::DictionaryTemplate>::operator->() const Line | Count | Source | 382 | 35 | 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 | 382 | 770 | V8_INLINE T* operator->() const { return this->template value<T>(); } |
v8::Local<v8::String>::operator->() const Line | Count | Source | 382 | 212k | V8_INLINE T* operator->() const { return this->template value<T>(); } |
v8::Local<v8::ArrayBuffer>::operator->() const Line | Count | Source | 382 | 735 | V8_INLINE T* operator->() const { return this->template value<T>(); } |
Unexecuted instantiation: v8::Local<v8::Promise>::operator->() const Unexecuted instantiation: v8::Local<v8::Uint32Array>::operator->() const v8::Local<v8::Uint8Array>::operator->() const Line | Count | Source | 382 | 70 | 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 Unexecuted instantiation: v8::Local<v8::Uint32>::operator->() const Unexecuted instantiation: v8::Local<v8::ModuleRequest>::operator->() const Unexecuted instantiation: v8::Local<v8::Module>::operator->() const v8::Local<v8::PrimitiveArray>::operator->() const Line | Count | Source | 382 | 35 | V8_INLINE T* operator->() const { return this->template value<T>(); } |
Unexecuted instantiation: v8::Local<v8::Int32>::operator->() const v8::Local<v8::ArrayBufferView>::operator->() const Line | Count | Source | 382 | 105 | 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::Promise::Resolver>::operator->() const Unexecuted instantiation: v8::Local<v8::SharedArrayBuffer>::operator->() const Unexecuted instantiation: v8::Local<v8::Set>::operator->() const v8::Local<v8::Boolean>::operator->() const Line | Count | Source | 382 | 105 | V8_INLINE T* operator->() const { return this->template value<T>(); } |
Unexecuted instantiation: v8::Local<v8::Message>::operator->() const v8::Local<v8::Name>::operator->() const Line | Count | Source | 382 | 280 | V8_INLINE T* operator->() const { return this->template value<T>(); } |
Unexecuted instantiation: v8::Local<v8::UnboundScript>::operator->() const 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 Unexecuted instantiation: v8::Local<v8::External>::operator->() const Unexecuted instantiation: v8::Local<v8::Map>::operator->() const Unexecuted instantiation: v8::Local<v8::RegExp>::operator->() const Unexecuted instantiation: v8::Local<v8::Proxy>::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 |
383 | | |
384 | 1.16M | V8_INLINE T* operator*() const { return this->operator->(); }v8::Local<v8::Value>::operator*() const Line | Count | Source | 384 | 1.16M | V8_INLINE T* operator*() const { return this->operator->(); } |
Unexecuted instantiation: v8::Local<v8::Data>::operator*() const v8::Local<v8::Object>::operator*() const Line | Count | Source | 384 | 280 | V8_INLINE T* operator*() const { return this->operator->(); } |
v8::Local<v8::Context>::operator*() const Line | Count | Source | 384 | 105 | V8_INLINE T* operator*() const { return this->operator->(); } |
v8::Local<v8::Function>::operator*() const Line | Count | Source | 384 | 875 | V8_INLINE T* operator*() const { return this->operator->(); } |
v8::Local<v8::Array>::operator*() const Line | Count | Source | 384 | 35 | 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::DictionaryTemplate>::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::Module>::operator*() const Unexecuted instantiation: v8::Local<v8::ArrayBuffer>::operator*() const Unexecuted instantiation: v8::Local<v8::UnboundScript>::operator*() const Unexecuted instantiation: v8::Local<v8::Promise>::operator*() const Unexecuted instantiation: v8::Local<v8::BigInt64Array>::operator*() const Unexecuted instantiation: v8::Local<v8::Promise::Resolver>::operator*() const Unexecuted instantiation: v8::Local<v8::WasmMemoryObject>::operator*() const Unexecuted instantiation: v8::Local<v8::Map>::operator*() const Unexecuted instantiation: v8::Local<v8::ArrayBufferView>::operator*() const Unexecuted instantiation: v8::Local<v8::External>::operator*() const |
385 | | |
386 | | /** |
387 | | * Checks whether two handles are equal or different. |
388 | | * They are equal iff they are both empty or they are both non-empty and the |
389 | | * objects to which they refer are physically equal. |
390 | | * |
391 | | * If both handles refer to JS objects, this is the same as strict |
392 | | * non-equality. For primitives, such as numbers or strings, a `false` return |
393 | | * value does not indicate that the values aren't equal in the JavaScript |
394 | | * sense. Use `Value::StrictEquals()` to check primitives for equality. |
395 | | */ |
396 | | |
397 | | template <class S> |
398 | 760k | V8_INLINE bool operator==(const Local<S>& that) const { |
399 | 760k | return internal::HandleHelper::EqualHandles(*this, that); |
400 | 760k | } Unexecuted instantiation: bool v8::Local<v8::Object>::operator==<v8::Object>(v8::Local<v8::Object> const&) const bool v8::Local<v8::Context>::operator==<v8::Context>(v8::Local<v8::Context> const&) const Line | Count | Source | 398 | 760k | V8_INLINE bool operator==(const Local<S>& that) const { | 399 | 760k | return internal::HandleHelper::EqualHandles(*this, that); | 400 | 760k | } |
Unexecuted instantiation: bool v8::Local<v8::Data>::operator==<v8::Data>(v8::Local<v8::Data> const&) const Unexecuted instantiation: bool v8::Local<v8::Symbol>::operator==<v8::Symbol>(v8::Local<v8::Symbol> const&) const Unexecuted instantiation: bool v8::Local<v8::Value>::operator==<v8::Symbol>(v8::Local<v8::Symbol> const&) const Unexecuted instantiation: bool v8::Local<v8::Value>::operator==<v8::Object>(v8::Local<v8::Object> const&) const 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::Object>::operator==<v8::Value>(v8::Local<v8::Value> const&) const |
401 | | |
402 | | template <class S> |
403 | | V8_INLINE bool operator==(const PersistentBase<S>& that) const { |
404 | | return internal::HandleHelper::EqualHandles(*this, that); |
405 | | } |
406 | | |
407 | | template <class S> |
408 | 760k | V8_INLINE bool operator!=(const Local<S>& that) const { |
409 | 760k | return !operator==(that); |
410 | 760k | } Unexecuted instantiation: bool v8::Local<v8::Object>::operator!=<v8::Object>(v8::Local<v8::Object> const&) const Unexecuted instantiation: bool v8::Local<v8::Symbol>::operator!=<v8::Symbol>(v8::Local<v8::Symbol> const&) const bool v8::Local<v8::Context>::operator!=<v8::Context>(v8::Local<v8::Context> const&) const Line | Count | Source | 408 | 760k | V8_INLINE bool operator!=(const Local<S>& that) const { | 409 | 760k | return !operator==(that); | 410 | 760k | } |
|
411 | | |
412 | | template <class S> |
413 | | V8_INLINE bool operator!=(const Persistent<S>& that) const { |
414 | | return !operator==(that); |
415 | | } |
416 | | |
417 | | /** |
418 | | * Cast a handle to a subclass, e.g. Local<Value> to Local<Object>. |
419 | | * This is only valid if the handle actually refers to a value of the |
420 | | * target type or if the handle is empty. |
421 | | */ |
422 | | template <class S> |
423 | 1.83M | V8_INLINE static Local<T> Cast(Local<S> that) { |
424 | | #ifdef V8_ENABLE_CHECKS |
425 | | // If we're going to perform the type check then we have to check |
426 | | // that the handle isn't empty before doing the checked cast. |
427 | | if (that.IsEmpty()) return Local<T>(); |
428 | | T::Cast(that.template value<S>()); |
429 | | #endif |
430 | 1.83M | return Local<T>(LocalBase<T>(that)); |
431 | 1.83M | } v8::Local<v8::Function> v8::Local<v8::Function>::Cast<v8::Value>(v8::Local<v8::Value>) Line | Count | Source | 423 | 3.57k | V8_INLINE static Local<T> Cast(Local<S> that) { | 424 | | #ifdef V8_ENABLE_CHECKS | 425 | | // If we're going to perform the type check then we have to check | 426 | | // that the handle isn't empty before doing the checked cast. | 427 | | if (that.IsEmpty()) return Local<T>(); | 428 | | T::Cast(that.template value<S>()); | 429 | | #endif | 430 | 3.57k | return Local<T>(LocalBase<T>(that)); | 431 | 3.57k | } |
v8::Local<v8::Number> v8::Local<v8::Number>::Cast<v8::Value>(v8::Local<v8::Value>) Line | Count | Source | 423 | 35 | V8_INLINE static Local<T> Cast(Local<S> that) { | 424 | | #ifdef V8_ENABLE_CHECKS | 425 | | // If we're going to perform the type check then we have to check | 426 | | // that the handle isn't empty before doing the checked cast. | 427 | | if (that.IsEmpty()) return Local<T>(); | 428 | | T::Cast(that.template value<S>()); | 429 | | #endif | 430 | 35 | return Local<T>(LocalBase<T>(that)); | 431 | 35 | } |
Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Object>(v8::Local<v8::Object>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Int8Array>(v8::Local<v8::Int8Array>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Uint8Array>(v8::Local<v8::Uint8Array>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Int16Array>(v8::Local<v8::Int16Array>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Uint16Array>(v8::Local<v8::Uint16Array>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Int32Array>(v8::Local<v8::Int32Array>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Uint32Array>(v8::Local<v8::Uint32Array>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Float32Array>(v8::Local<v8::Float32Array>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Float64Array>(v8::Local<v8::Float64Array>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::BigInt64Array>(v8::Local<v8::BigInt64Array>) v8::Local<v8::Object> v8::Local<v8::Object>::Cast<v8::Value>(v8::Local<v8::Value>) Line | Count | Source | 423 | 47.2k | V8_INLINE static Local<T> Cast(Local<S> that) { | 424 | | #ifdef V8_ENABLE_CHECKS | 425 | | // If we're going to perform the type check then we have to check | 426 | | // that the handle isn't empty before doing the checked cast. | 427 | | if (that.IsEmpty()) return Local<T>(); | 428 | | T::Cast(that.template value<S>()); | 429 | | #endif | 430 | 47.2k | return Local<T>(LocalBase<T>(that)); | 431 | 47.2k | } |
Unexecuted instantiation: v8::Local<v8::Name> v8::Local<v8::Name>::Cast<v8::String>(v8::Local<v8::String>) Unexecuted instantiation: v8::Local<v8::Name> v8::Local<v8::Name>::Cast<v8::Symbol>(v8::Local<v8::Symbol>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Symbol>(v8::Local<v8::Symbol>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::String>(v8::Local<v8::String>) Unexecuted instantiation: v8::Local<v8::Promise> v8::Local<v8::Promise>::Cast<v8::Value>(v8::Local<v8::Value>) v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Function>(v8::Local<v8::Function>) Line | Count | Source | 423 | 35 | V8_INLINE static Local<T> Cast(Local<S> that) { | 424 | | #ifdef V8_ENABLE_CHECKS | 425 | | // If we're going to perform the type check then we have to check | 426 | | // that the handle isn't empty before doing the checked cast. | 427 | | if (that.IsEmpty()) return Local<T>(); | 428 | | T::Cast(that.template value<S>()); | 429 | | #endif | 430 | 35 | return Local<T>(LocalBase<T>(that)); | 431 | 35 | } |
Unexecuted instantiation: v8::Local<v8::Uint32> v8::Local<v8::Uint32>::Cast<v8::Value>(v8::Local<v8::Value>) Unexecuted instantiation: v8::Local<v8::Data> v8::Local<v8::Data>::Cast<v8::Value>(v8::Local<v8::Value>) v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Data>(v8::Local<v8::Data>) Line | Count | Source | 423 | 1.52M | V8_INLINE static Local<T> Cast(Local<S> that) { | 424 | | #ifdef V8_ENABLE_CHECKS | 425 | | // If we're going to perform the type check then we have to check | 426 | | // that the handle isn't empty before doing the checked cast. | 427 | | if (that.IsEmpty()) return Local<T>(); | 428 | | T::Cast(that.template value<S>()); | 429 | | #endif | 430 | 1.52M | return Local<T>(LocalBase<T>(that)); | 431 | 1.52M | } |
v8::Local<v8::Array> v8::Local<v8::Array>::Cast<v8::Value>(v8::Local<v8::Value>) Line | Count | Source | 423 | 1.05k | V8_INLINE static Local<T> Cast(Local<S> that) { | 424 | | #ifdef V8_ENABLE_CHECKS | 425 | | // If we're going to perform the type check then we have to check | 426 | | // that the handle isn't empty before doing the checked cast. | 427 | | if (that.IsEmpty()) return Local<T>(); | 428 | | T::Cast(that.template value<S>()); | 429 | | #endif | 430 | 1.05k | return Local<T>(LocalBase<T>(that)); | 431 | 1.05k | } |
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::String> v8::Local<v8::String>::Cast<v8::Value>(v8::Local<v8::Value>) Line | Count | Source | 423 | 233k | V8_INLINE static Local<T> Cast(Local<S> that) { | 424 | | #ifdef V8_ENABLE_CHECKS | 425 | | // If we're going to perform the type check then we have to check | 426 | | // that the handle isn't empty before doing the checked cast. | 427 | | if (that.IsEmpty()) return Local<T>(); | 428 | | T::Cast(that.template value<S>()); | 429 | | #endif | 430 | 233k | return Local<T>(LocalBase<T>(that)); | 431 | 233k | } |
Unexecuted instantiation: v8::Local<v8::Int32> v8::Local<v8::Int32>::Cast<v8::Value>(v8::Local<v8::Value>) Unexecuted instantiation: v8::Local<v8::Symbol> v8::Local<v8::Symbol>::Cast<v8::Value>(v8::Local<v8::Value>) v8::Local<v8::ArrayBufferView> v8::Local<v8::ArrayBufferView>::Cast<v8::Value>(v8::Local<v8::Value>) Line | Count | Source | 423 | 35 | V8_INLINE static Local<T> Cast(Local<S> that) { | 424 | | #ifdef V8_ENABLE_CHECKS | 425 | | // If we're going to perform the type check then we have to check | 426 | | // that the handle isn't empty before doing the checked cast. | 427 | | if (that.IsEmpty()) return Local<T>(); | 428 | | T::Cast(that.template value<S>()); | 429 | | #endif | 430 | 35 | return Local<T>(LocalBase<T>(that)); | 431 | 35 | } |
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>) Unexecuted instantiation: v8::Local<v8::ArrayBuffer> v8::Local<v8::ArrayBuffer>::Cast<v8::Value>(v8::Local<v8::Value>) Unexecuted instantiation: v8::Local<v8::SharedArrayBuffer> v8::Local<v8::SharedArrayBuffer>::Cast<v8::Value>(v8::Local<v8::Value>) Unexecuted instantiation: v8::Local<v8::Integer> v8::Local<v8::Integer>::Cast<v8::Value>(v8::Local<v8::Value>) Unexecuted instantiation: v8::Local<v8::ArrayBufferView> v8::Local<v8::ArrayBufferView>::Cast<v8::Object>(v8::Local<v8::Object>) Unexecuted instantiation: v8::Local<v8::Module> v8::Local<v8::Module>::Cast<v8::Data>(v8::Local<v8::Data>) v8::Local<v8::Function> v8::Local<v8::Function>::Cast<v8::Data>(v8::Local<v8::Data>) Line | Count | Source | 423 | 2.48k | V8_INLINE static Local<T> Cast(Local<S> that) { | 424 | | #ifdef V8_ENABLE_CHECKS | 425 | | // If we're going to perform the type check then we have to check | 426 | | // that the handle isn't empty before doing the checked cast. | 427 | | if (that.IsEmpty()) return Local<T>(); | 428 | | T::Cast(that.template value<S>()); | 429 | | #endif | 430 | 2.48k | return Local<T>(LocalBase<T>(that)); | 431 | 2.48k | } |
v8::Local<v8::Boolean> v8::Local<v8::Boolean>::Cast<v8::Value>(v8::Local<v8::Value>) Line | Count | Source | 423 | 105 | V8_INLINE static Local<T> Cast(Local<S> that) { | 424 | | #ifdef V8_ENABLE_CHECKS | 425 | | // If we're going to perform the type check then we have to check | 426 | | // that the handle isn't empty before doing the checked cast. | 427 | | if (that.IsEmpty()) return Local<T>(); | 428 | | T::Cast(that.template value<S>()); | 429 | | #endif | 430 | 105 | return Local<T>(LocalBase<T>(that)); | 431 | 105 | } |
Unexecuted instantiation: v8::Local<v8::Promise::Resolver> v8::Local<v8::Promise::Resolver>::Cast<v8::Value>(v8::Local<v8::Value>) v8::Local<v8::Name> v8::Local<v8::Name>::Cast<v8::Value>(v8::Local<v8::Value>) Line | Count | Source | 423 | 26.6k | V8_INLINE static Local<T> Cast(Local<S> that) { | 424 | | #ifdef V8_ENABLE_CHECKS | 425 | | // If we're going to perform the type check then we have to check | 426 | | // that the handle isn't empty before doing the checked cast. | 427 | | if (that.IsEmpty()) return Local<T>(); | 428 | | T::Cast(that.template value<S>()); | 429 | | #endif | 430 | 26.6k | return Local<T>(LocalBase<T>(that)); | 431 | 26.6k | } |
v8::Local<v8::String> v8::Local<v8::String>::Cast<v8::Name>(v8::Local<v8::Name>) Line | Count | Source | 423 | 280 | V8_INLINE static Local<T> Cast(Local<S> that) { | 424 | | #ifdef V8_ENABLE_CHECKS | 425 | | // If we're going to perform the type check then we have to check | 426 | | // that the handle isn't empty before doing the checked cast. | 427 | | if (that.IsEmpty()) return Local<T>(); | 428 | | T::Cast(that.template value<S>()); | 429 | | #endif | 430 | 280 | return Local<T>(LocalBase<T>(that)); | 431 | 280 | } |
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::Value> v8::Local<v8::Value>::Cast<v8::Promise>(v8::Local<v8::Promise>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Value>(v8::Local<v8::Value>) Unexecuted instantiation: v8::Local<v8::Promise> v8::Local<v8::Promise>::Cast<v8::Promise::Resolver>(v8::Local<v8::Promise::Resolver>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::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::External> v8::Local<v8::External>::Cast<v8::Value>(v8::Local<v8::Value>) 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::Array> v8::Local<v8::Array>::Cast<v8::Object>(v8::Local<v8::Object>) Unexecuted instantiation: v8::Local<v8::Proxy> v8::Local<v8::Proxy>::Cast<v8::Value>(v8::Local<v8::Value>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::WasmMemoryObject>(v8::Local<v8::WasmMemoryObject>) Unexecuted instantiation: v8::Local<v8::WasmMemoryObject> v8::Local<v8::WasmMemoryObject>::Cast<v8::Value>(v8::Local<v8::Value>) Unexecuted instantiation: v8::Local<v8::Uint32Array> v8::Local<v8::Uint32Array>::Cast<v8::Value>(v8::Local<v8::Value>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::ArrayBuffer>(v8::Local<v8::ArrayBuffer>) Unexecuted instantiation: v8::Local<v8::Object> v8::Local<v8::Object>::Cast<v8::Object>(v8::Local<v8::Object>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::Map>(v8::Local<v8::Map>) Unexecuted instantiation: v8::Local<v8::Uint8Array> v8::Local<v8::Uint8Array>::Cast<v8::Object>(v8::Local<v8::Object>) Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::Cast<v8::ArrayBufferView>(v8::Local<v8::ArrayBufferView>) 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>) |
432 | | |
433 | | /** |
434 | | * Calling this is equivalent to Local<S>::Cast(). |
435 | | * In particular, this is only valid if the handle actually refers to a value |
436 | | * of the target type or if the handle is empty. |
437 | | */ |
438 | | template <class S> |
439 | 1.83M | V8_INLINE Local<S> As() const { |
440 | 1.83M | return Local<S>::Cast(*this); |
441 | 1.83M | } v8::Local<v8::Function> v8::Local<v8::Value>::As<v8::Function>() const Line | Count | Source | 439 | 3.57k | V8_INLINE Local<S> As() const { | 440 | 3.57k | return Local<S>::Cast(*this); | 441 | 3.57k | } |
v8::Local<v8::Number> v8::Local<v8::Value>::As<v8::Number>() const Line | Count | Source | 439 | 35 | V8_INLINE Local<S> As() const { | 440 | 35 | return Local<S>::Cast(*this); | 441 | 35 | } |
Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Object>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Int8Array>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Uint8Array>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Int16Array>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Uint16Array>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Int32Array>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Uint32Array>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Float32Array>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Float64Array>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::BigInt64Array>::As<v8::Value>() const v8::Local<v8::Object> v8::Local<v8::Value>::As<v8::Object>() const Line | Count | Source | 439 | 47.2k | V8_INLINE Local<S> As() const { | 440 | 47.2k | return Local<S>::Cast(*this); | 441 | 47.2k | } |
Unexecuted instantiation: v8::Local<v8::Name> v8::Local<v8::String>::As<v8::Name>() const Unexecuted instantiation: v8::Local<v8::Name> v8::Local<v8::Symbol>::As<v8::Name>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Symbol>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::String>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Promise> v8::Local<v8::Value>::As<v8::Promise>() const v8::Local<v8::Value> v8::Local<v8::Function>::As<v8::Value>() const Line | Count | Source | 439 | 35 | V8_INLINE Local<S> As() const { | 440 | 35 | return Local<S>::Cast(*this); | 441 | 35 | } |
Unexecuted instantiation: v8::Local<v8::Uint32> v8::Local<v8::Value>::As<v8::Uint32>() const Unexecuted instantiation: v8::Local<v8::Data> v8::Local<v8::Value>::As<v8::Data>() const v8::Local<v8::Value> v8::Local<v8::Data>::As<v8::Value>() const Line | Count | Source | 439 | 1.52M | V8_INLINE Local<S> As() const { | 440 | 1.52M | return Local<S>::Cast(*this); | 441 | 1.52M | } |
v8::Local<v8::Array> v8::Local<v8::Value>::As<v8::Array>() const Line | Count | Source | 439 | 1.05k | V8_INLINE Local<S> As() const { | 440 | 1.05k | return Local<S>::Cast(*this); | 441 | 1.05k | } |
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::String> v8::Local<v8::Value>::As<v8::String>() const Line | Count | Source | 439 | 233k | V8_INLINE Local<S> As() const { | 440 | 233k | return Local<S>::Cast(*this); | 441 | 233k | } |
Unexecuted instantiation: v8::Local<v8::Int32> v8::Local<v8::Value>::As<v8::Int32>() const Unexecuted instantiation: v8::Local<v8::Symbol> v8::Local<v8::Value>::As<v8::Symbol>() const v8::Local<v8::ArrayBufferView> v8::Local<v8::Value>::As<v8::ArrayBufferView>() const Line | Count | Source | 439 | 35 | V8_INLINE Local<S> As() const { | 440 | 35 | return Local<S>::Cast(*this); | 441 | 35 | } |
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 Unexecuted instantiation: v8::Local<v8::ArrayBuffer> v8::Local<v8::Value>::As<v8::ArrayBuffer>() const Unexecuted instantiation: v8::Local<v8::SharedArrayBuffer> v8::Local<v8::Value>::As<v8::SharedArrayBuffer>() const Unexecuted instantiation: v8::Local<v8::Integer> v8::Local<v8::Value>::As<v8::Integer>() const Unexecuted instantiation: v8::Local<v8::ArrayBufferView> v8::Local<v8::Object>::As<v8::ArrayBufferView>() const Unexecuted instantiation: v8::Local<v8::Module> v8::Local<v8::Data>::As<v8::Module>() const v8::Local<v8::Function> v8::Local<v8::Data>::As<v8::Function>() const Line | Count | Source | 439 | 2.48k | V8_INLINE Local<S> As() const { | 440 | 2.48k | return Local<S>::Cast(*this); | 441 | 2.48k | } |
v8::Local<v8::Boolean> v8::Local<v8::Value>::As<v8::Boolean>() const Line | Count | Source | 439 | 105 | V8_INLINE Local<S> As() const { | 440 | 105 | return Local<S>::Cast(*this); | 441 | 105 | } |
Unexecuted instantiation: v8::Local<v8::Promise::Resolver> v8::Local<v8::Value>::As<v8::Promise::Resolver>() const v8::Local<v8::Name> v8::Local<v8::Value>::As<v8::Name>() const Line | Count | Source | 439 | 26.6k | V8_INLINE Local<S> As() const { | 440 | 26.6k | return Local<S>::Cast(*this); | 441 | 26.6k | } |
v8::Local<v8::String> v8::Local<v8::Name>::As<v8::String>() const Line | Count | Source | 439 | 280 | V8_INLINE Local<S> As() const { | 440 | 280 | return Local<S>::Cast(*this); | 441 | 280 | } |
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::Value> v8::Local<v8::Promise>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Value>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Promise> v8::Local<v8::Promise::Resolver>::As<v8::Promise>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Promise::Resolver>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::ArrayBuffer> v8::Local<v8::Object>::As<v8::ArrayBuffer>() const Unexecuted instantiation: v8::Local<v8::External> v8::Local<v8::Value>::As<v8::External>() 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::Array> v8::Local<v8::Object>::As<v8::Array>() const Unexecuted instantiation: v8::Local<v8::Proxy> v8::Local<v8::Value>::As<v8::Proxy>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::WasmMemoryObject>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::WasmMemoryObject> v8::Local<v8::Value>::As<v8::WasmMemoryObject>() const Unexecuted instantiation: v8::Local<v8::Uint32Array> v8::Local<v8::Value>::As<v8::Uint32Array>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::ArrayBuffer>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Object> v8::Local<v8::Object>::As<v8::Object>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::Map>::As<v8::Value>() const Unexecuted instantiation: v8::Local<v8::Uint8Array> v8::Local<v8::Object>::As<v8::Uint8Array>() const Unexecuted instantiation: v8::Local<v8::Value> v8::Local<v8::ArrayBufferView>::As<v8::Value>() const 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 |
442 | | |
443 | | /** |
444 | | * Create a local handle for the content of another handle. |
445 | | * The referee is kept alive by the local handle even when |
446 | | * the original handle is destroyed/disposed. |
447 | | */ |
448 | | V8_INLINE static Local<T> New(Isolate* isolate, Local<T> that) { |
449 | | return New(isolate, that.template value<T, true>()); |
450 | | } |
451 | | |
452 | | V8_INLINE static Local<T> New(Isolate* isolate, |
453 | 810k | const PersistentBase<T>& that) { |
454 | 810k | return New(isolate, that.template value<T, true>()); |
455 | 810k | } v8::Local<v8::Context>::New(v8::Isolate*, v8::PersistentBase<v8::Context> const&) Line | Count | Source | 453 | 24.9k | const PersistentBase<T>& that) { | 454 | 24.9k | return New(isolate, that.template value<T, true>()); | 455 | 24.9k | } |
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 | 453 | 140 | const PersistentBase<T>& that) { | 454 | 140 | return New(isolate, that.template value<T, true>()); | 455 | 140 | } |
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 | 453 | 70 | const PersistentBase<T>& that) { | 454 | 70 | return New(isolate, that.template value<T, true>()); | 455 | 70 | } |
v8::Local<v8::Uint32Array>::New(v8::Isolate*, v8::PersistentBase<v8::Uint32Array> const&) Line | Count | Source | 453 | 245 | const PersistentBase<T>& that) { | 454 | 245 | return New(isolate, that.template value<T, true>()); | 455 | 245 | } |
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 | 453 | 175 | const PersistentBase<T>& that) { | 454 | 175 | return New(isolate, that.template value<T, true>()); | 455 | 175 | } |
v8::Local<v8::BigInt64Array>::New(v8::Isolate*, v8::PersistentBase<v8::BigInt64Array> const&) Line | Count | Source | 453 | 70 | const PersistentBase<T>& that) { | 454 | 70 | return New(isolate, that.template value<T, true>()); | 455 | 70 | } |
v8::Local<v8::Object>::New(v8::Isolate*, v8::PersistentBase<v8::Object> const&) Line | Count | Source | 453 | 280 | const PersistentBase<T>& that) { | 454 | 280 | return New(isolate, that.template value<T, true>()); | 455 | 280 | } |
v8::Local<v8::Value>::New(v8::Isolate*, v8::PersistentBase<v8::Value> const&) Line | Count | Source | 453 | 784k | const PersistentBase<T>& that) { | 454 | 784k | return New(isolate, that.template value<T, true>()); | 455 | 784k | } |
Unexecuted instantiation: v8::Local<v8::Function>::New(v8::Isolate*, v8::PersistentBase<v8::Function> const&) Unexecuted instantiation: v8::Local<v8::Array>::New(v8::Isolate*, v8::PersistentBase<v8::Array> const&) Unexecuted instantiation: v8::Local<v8::Module>::New(v8::Isolate*, v8::PersistentBase<v8::Module> const&) Unexecuted instantiation: v8::Local<v8::ArrayBuffer>::New(v8::Isolate*, v8::PersistentBase<v8::ArrayBuffer> const&) Unexecuted instantiation: v8::Local<v8::Promise>::New(v8::Isolate*, v8::PersistentBase<v8::Promise> const&) Unexecuted instantiation: v8::Local<v8::Promise::Resolver>::New(v8::Isolate*, v8::PersistentBase<v8::Promise::Resolver> const&) Unexecuted instantiation: v8::Local<v8::RegExp>::New(v8::Isolate*, v8::PersistentBase<v8::RegExp> const&) Unexecuted instantiation: v8::Local<v8::WasmMemoryObject>::New(v8::Isolate*, v8::PersistentBase<v8::WasmMemoryObject> const&) Unexecuted instantiation: v8::Local<v8::Map>::New(v8::Isolate*, v8::PersistentBase<v8::Map> 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&) |
456 | | |
457 | | V8_INLINE static Local<T> New(Isolate* isolate, |
458 | 0 | const BasicTracedReference<T>& that) { |
459 | 0 | return New(isolate, that.template value<T, true>()); |
460 | 0 | } Unexecuted instantiation: v8::Local<v8::Object>::New(v8::Isolate*, v8::BasicTracedReference<v8::Object> const&) Unexecuted instantiation: v8::Local<v8::Context>::New(v8::Isolate*, v8::BasicTracedReference<v8::Context> const&) Unexecuted instantiation: v8::Local<v8::UnboundScript>::New(v8::Isolate*, v8::BasicTracedReference<v8::UnboundScript> const&) |
461 | | |
462 | | private: |
463 | | friend class TracedReferenceBase; |
464 | | friend class Utils; |
465 | | template <class F> |
466 | | friend class Eternal; |
467 | | template <class F> |
468 | | friend class Global; |
469 | | template <class F> |
470 | | friend class Local; |
471 | | template <class F> |
472 | | friend class MaybeLocal; |
473 | | template <class F, class M> |
474 | | friend class Persistent; |
475 | | template <class F> |
476 | | friend class FunctionCallbackInfo; |
477 | | template <class F> |
478 | | friend class PropertyCallbackInfo; |
479 | | friend class String; |
480 | | friend class Object; |
481 | | friend class Context; |
482 | | friend class Isolate; |
483 | | friend class Private; |
484 | | template <class F> |
485 | | friend class internal::CustomArguments; |
486 | | friend Local<Primitive> Undefined(Isolate* isolate); |
487 | | friend Local<Primitive> Null(Isolate* isolate); |
488 | | friend Local<Boolean> True(Isolate* isolate); |
489 | | friend Local<Boolean> False(Isolate* isolate); |
490 | | friend class HandleScope; |
491 | | friend class EscapableHandleScope; |
492 | | friend class InternalEscapableScope; |
493 | | template <class F1, class F2, class F3> |
494 | | friend class PersistentValueMapBase; |
495 | | template <class F> |
496 | | friend class ReturnValue; |
497 | | template <class F> |
498 | | friend class Traced; |
499 | | friend class internal::SamplingHeapProfiler; |
500 | | friend class internal::HandleHelper; |
501 | | friend class debug::ConsoleCallArguments; |
502 | | friend class internal::LocalUnchecked<T>; |
503 | | |
504 | | explicit Local(no_checking_tag do_not_check) |
505 | 0 | : LocalBase<T>(), StackAllocated(do_not_check) {}Unexecuted instantiation: v8::Local<v8::Value>::Local(v8::api_internal::StackAllocated<false>::no_checking_tag) Unexecuted instantiation: v8::Local<v8::Name>::Local(v8::api_internal::StackAllocated<false>::no_checking_tag) Unexecuted instantiation: v8::Local<v8::String>::Local(v8::api_internal::StackAllocated<false>::no_checking_tag) |
506 | | explicit Local(const Local<T>& other, no_checking_tag do_not_check) |
507 | 38.4k | : LocalBase<T>(other), StackAllocated(do_not_check) {}v8::Local<v8::String>::Local(v8::Local<v8::String> const&, v8::api_internal::StackAllocated<false>::no_checking_tag) Line | Count | Source | 507 | 15.0k | : LocalBase<T>(other), StackAllocated(do_not_check) {} |
v8::Local<v8::Name>::Local(v8::Local<v8::Name> const&, v8::api_internal::StackAllocated<false>::no_checking_tag) Line | Count | Source | 507 | 11.6k | : LocalBase<T>(other), StackAllocated(do_not_check) {} |
v8::Local<v8::Value>::Local(v8::Local<v8::Value> const&, v8::api_internal::StackAllocated<false>::no_checking_tag) Line | Count | Source | 507 | 11.7k | : LocalBase<T>(other), StackAllocated(do_not_check) {} |
Unexecuted instantiation: v8::Local<v8::Object>::Local(v8::Local<v8::Object> const&, v8::api_internal::StackAllocated<false>::no_checking_tag) Unexecuted instantiation: v8::Local<v8::SharedArrayBuffer>::Local(v8::Local<v8::SharedArrayBuffer> const&, v8::api_internal::StackAllocated<false>::no_checking_tag) Unexecuted instantiation: v8::Local<v8::ArrayBuffer>::Local(v8::Local<v8::ArrayBuffer> const&, v8::api_internal::StackAllocated<false>::no_checking_tag) |
508 | | |
509 | 2.72M | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {}v8::Local<v8::Function>::Local(v8::LocalBase<v8::Function> const&) Line | Count | Source | 509 | 6.09k | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::Context>::Local(v8::LocalBase<v8::Context> const&) Line | Count | Source | 509 | 24.9k | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::Value>::Local(v8::LocalBase<v8::Value> const&) Line | Count | Source | 509 | 2.34M | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::Primitive>::Local(v8::LocalBase<v8::Primitive> const&) Line | Count | Source | 509 | 2.24k | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::Boolean>::Local(v8::LocalBase<v8::Boolean> const&) Line | Count | Source | 509 | 8.96k | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::Private>::Local(v8::LocalBase<v8::Private> const&) Line | Count | Source | 509 | 1.43k | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::Symbol>::Local(v8::LocalBase<v8::Symbol> const&) Line | Count | Source | 509 | 2.38k | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::String>::Local(v8::LocalBase<v8::String> const&) Line | Count | Source | 509 | 249k | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::Object>::Local(v8::LocalBase<v8::Object> const&) Line | Count | Source | 509 | 48.9k | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::FunctionTemplate>::Local(v8::LocalBase<v8::FunctionTemplate> const&) Line | Count | Source | 509 | 700 | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::Number>::Local(v8::LocalBase<v8::Number> const&) Line | Count | Source | 509 | 35 | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::Uint32Array>::Local(v8::LocalBase<v8::Uint32Array> const&) Line | Count | Source | 509 | 245 | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::Float64Array>::Local(v8::LocalBase<v8::Float64Array> const&) Line | Count | Source | 509 | 175 | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::DictionaryTemplate>::Local(v8::LocalBase<v8::DictionaryTemplate> const&) Line | Count | Source | 509 | 35 | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::ObjectTemplate>::Local(v8::LocalBase<v8::ObjectTemplate> const&) Line | Count | Source | 509 | 1.26k | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::Int32Array>::Local(v8::LocalBase<v8::Int32Array> const&) Line | Count | Source | 509 | 70 | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
Unexecuted instantiation: v8::Local<v8::Promise>::Local(v8::LocalBase<v8::Promise> const&) v8::Local<v8::Uint8Array>::Local(v8::LocalBase<v8::Uint8Array> const&) Line | Count | Source | 509 | 140 | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
v8::Local<v8::Array>::Local(v8::LocalBase<v8::Array> const&) Line | Count | Source | 509 | 1.75k | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
Unexecuted instantiation: v8::Local<v8::Uint32>::Local(v8::LocalBase<v8::Uint32> const&) v8::Local<v8::Data>::Local(v8::LocalBase<v8::Data> const&) Line | Count | Source | 509 | 2.59k | V8_INLINE explicit Local(const LocalBase<T>& other) : 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&) Unexecuted instantiation: v8::Local<v8::Int32>::Local(v8::LocalBase<v8::Int32> const&) v8::Local<v8::ArrayBufferView>::Local(v8::LocalBase<v8::ArrayBufferView> const&) Line | Count | Source | 509 | 35 | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
Unexecuted instantiation: v8::Local<v8::ModuleRequest>::Local(v8::LocalBase<v8::ModuleRequest> const&) Unexecuted instantiation: v8::Local<v8::ArrayBuffer>::Local(v8::LocalBase<v8::ArrayBuffer> const&) Unexecuted instantiation: v8::Local<v8::SharedArrayBuffer>::Local(v8::LocalBase<v8::SharedArrayBuffer> const&) Unexecuted instantiation: v8::Local<v8::Integer>::Local(v8::LocalBase<v8::Integer> const&) Unexecuted instantiation: v8::Local<v8::UnboundScript>::Local(v8::LocalBase<v8::UnboundScript> const&) v8::Local<v8::BigInt64Array>::Local(v8::LocalBase<v8::BigInt64Array> const&) Line | Count | Source | 509 | 70 | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
Unexecuted instantiation: v8::Local<v8::Promise::Resolver>::Local(v8::LocalBase<v8::Promise::Resolver> const&) v8::Local<v8::Name>::Local(v8::LocalBase<v8::Name> const&) Line | Count | Source | 509 | 26.6k | V8_INLINE explicit Local(const LocalBase<T>& other) : LocalBase<T>(other) {} |
Unexecuted instantiation: v8::Local<v8::StackTrace>::Local(v8::LocalBase<v8::StackTrace> const&) Unexecuted instantiation: v8::Local<v8::BigInt>::Local(v8::LocalBase<v8::BigInt> const&) Unexecuted instantiation: v8::Local<v8::External>::Local(v8::LocalBase<v8::External> const&) Unexecuted instantiation: v8::Local<v8::Map>::Local(v8::LocalBase<v8::Map> const&) Unexecuted instantiation: v8::Local<v8::RegExp>::Local(v8::LocalBase<v8::RegExp> const&) Unexecuted instantiation: v8::Local<v8::Proxy>::Local(v8::LocalBase<v8::Proxy> 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&) |
510 | | |
511 | | V8_INLINE static Local<T> FromRepr( |
512 | 0 | internal::ValueHelper::InternalRepresentationType repr) { |
513 | 0 | return Local<T>(LocalBase<T>::FromRepr(repr)); |
514 | 0 | } Unexecuted instantiation: v8::Local<v8::Private>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::Symbol>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::String>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::DictionaryTemplate>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::FunctionTemplate>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::ObjectTemplate>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::Uint32Array>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::Uint8Array>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::Float64Array>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::Array>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::Object>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::Int32Array>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::BigInt64Array>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::Function>::FromRepr(unsigned long*) Unexecuted instantiation: v8::Local<v8::Context>::FromRepr(unsigned long*) |
515 | | |
516 | 54.9k | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { |
517 | 54.9k | return Local<T>(LocalBase<T>::FromSlot(slot)); |
518 | 54.9k | } v8::Local<v8::String>::FromSlot(unsigned long*) Line | Count | Source | 516 | 16.3k | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 16.3k | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 16.3k | } |
v8::Local<v8::Primitive>::FromSlot(unsigned long*) Line | Count | Source | 516 | 2.24k | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 2.24k | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 2.24k | } |
v8::Local<v8::Boolean>::FromSlot(unsigned long*) Line | Count | Source | 516 | 8.85k | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 8.85k | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 8.85k | } |
v8::Local<v8::Value>::FromSlot(unsigned long*) Line | Count | Source | 516 | 16.9k | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 16.9k | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 16.9k | } |
v8::Local<v8::Private>::FromSlot(unsigned long*) Line | Count | Source | 516 | 1.43k | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 1.43k | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 1.43k | } |
v8::Local<v8::Symbol>::FromSlot(unsigned long*) Line | Count | Source | 516 | 2.38k | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 2.38k | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 2.38k | } |
v8::Local<v8::DictionaryTemplate>::FromSlot(unsigned long*) Line | Count | Source | 516 | 35 | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 35 | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 35 | } |
v8::Local<v8::FunctionTemplate>::FromSlot(unsigned long*) Line | Count | Source | 516 | 700 | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 700 | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 700 | } |
v8::Local<v8::ObjectTemplate>::FromSlot(unsigned long*) Line | Count | Source | 516 | 1.26k | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 1.26k | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 1.26k | } |
v8::Local<v8::Object>::FromSlot(unsigned long*) Line | Count | Source | 516 | 1.40k | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 1.40k | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 1.40k | } |
v8::Local<v8::Array>::FromSlot(unsigned long*) Line | Count | Source | 516 | 700 | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 700 | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 700 | } |
Unexecuted instantiation: v8::Local<v8::Promise>::FromSlot(unsigned long*) Unexecuted instantiation: v8::Local<v8::Module>::FromSlot(unsigned long*) Unexecuted instantiation: v8::Local<v8::Uint8Array>::FromSlot(unsigned long*) v8::Local<v8::Data>::FromSlot(unsigned long*) Line | Count | Source | 516 | 2.59k | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 2.59k | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 2.59k | } |
v8::Local<v8::Function>::FromSlot(unsigned long*) Line | Count | Source | 516 | 35 | V8_INLINE static Local<T> FromSlot(internal::Address* slot) { | 517 | 35 | return Local<T>(LocalBase<T>::FromSlot(slot)); | 518 | 35 | } |
Unexecuted instantiation: v8::Local<v8::Context>::FromSlot(unsigned long*) Unexecuted instantiation: v8::Local<v8::StackTrace>::FromSlot(unsigned long*) Unexecuted instantiation: v8::Local<v8::Integer>::FromSlot(unsigned long*) Unexecuted instantiation: v8::Local<v8::Map>::FromSlot(unsigned long*) |
519 | | |
520 | | #ifdef V8_ENABLE_DIRECT_HANDLE |
521 | | friend class TypecheckWitness; |
522 | | |
523 | | V8_INLINE static Local<T> FromAddress(internal::Address ptr) { |
524 | | return Local<T>(LocalBase<T>(ptr)); |
525 | | } |
526 | | #endif // V8_ENABLE_DIRECT_HANDLE |
527 | | |
528 | 6 | V8_INLINE static Local<T> New(Isolate* isolate, internal::Address value) { |
529 | 6 | return Local<T>(LocalBase<T>::New(isolate, value)); |
530 | 6 | } Unexecuted instantiation: v8::Local<v8::Data>::New(v8::Isolate*, unsigned long) v8::Local<v8::Value>::New(v8::Isolate*, unsigned long) Line | Count | Source | 528 | 6 | V8_INLINE static Local<T> New(Isolate* isolate, internal::Address value) { | 529 | 6 | return Local<T>(LocalBase<T>::New(isolate, value)); | 530 | 6 | } |
|
531 | | |
532 | 810k | V8_INLINE static Local<T> New(Isolate* isolate, T* that) { |
533 | 810k | return Local<T>(LocalBase<T>::New(isolate, that)); |
534 | 810k | } Unexecuted instantiation: v8::Local<v8::Data>::New(v8::Isolate*, v8::Data*) v8::Local<v8::Context>::New(v8::Isolate*, v8::Context*) Line | Count | Source | 532 | 24.9k | V8_INLINE static Local<T> New(Isolate* isolate, T* that) { | 533 | 24.9k | return Local<T>(LocalBase<T>::New(isolate, that)); | 534 | 24.9k | } |
v8::Local<v8::Object>::New(v8::Isolate*, v8::Object*) Line | Count | Source | 532 | 280 | V8_INLINE static Local<T> New(Isolate* isolate, T* that) { | 533 | 280 | return Local<T>(LocalBase<T>::New(isolate, that)); | 534 | 280 | } |
Unexecuted instantiation: v8::Local<v8::Int8Array>::New(v8::Isolate*, v8::Int8Array*) v8::Local<v8::Uint8Array>::New(v8::Isolate*, v8::Uint8Array*) Line | Count | Source | 532 | 140 | V8_INLINE static Local<T> New(Isolate* isolate, T* that) { | 533 | 140 | return Local<T>(LocalBase<T>::New(isolate, that)); | 534 | 140 | } |
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 | 532 | 70 | V8_INLINE static Local<T> New(Isolate* isolate, T* that) { | 533 | 70 | return Local<T>(LocalBase<T>::New(isolate, that)); | 534 | 70 | } |
v8::Local<v8::Uint32Array>::New(v8::Isolate*, v8::Uint32Array*) Line | Count | Source | 532 | 245 | V8_INLINE static Local<T> New(Isolate* isolate, T* that) { | 533 | 245 | return Local<T>(LocalBase<T>::New(isolate, that)); | 534 | 245 | } |
Unexecuted instantiation: v8::Local<v8::Float32Array>::New(v8::Isolate*, v8::Float32Array*) v8::Local<v8::Float64Array>::New(v8::Isolate*, v8::Float64Array*) Line | Count | Source | 532 | 175 | V8_INLINE static Local<T> New(Isolate* isolate, T* that) { | 533 | 175 | return Local<T>(LocalBase<T>::New(isolate, that)); | 534 | 175 | } |
v8::Local<v8::BigInt64Array>::New(v8::Isolate*, v8::BigInt64Array*) Line | Count | Source | 532 | 70 | V8_INLINE static Local<T> New(Isolate* isolate, T* that) { | 533 | 70 | return Local<T>(LocalBase<T>::New(isolate, that)); | 534 | 70 | } |
v8::Local<v8::Value>::New(v8::Isolate*, v8::Value*) Line | Count | Source | 532 | 784k | V8_INLINE static Local<T> New(Isolate* isolate, T* that) { | 533 | 784k | return Local<T>(LocalBase<T>::New(isolate, that)); | 534 | 784k | } |
Unexecuted instantiation: v8::Local<v8::Function>::New(v8::Isolate*, v8::Function*) Unexecuted instantiation: v8::Local<v8::Array>::New(v8::Isolate*, v8::Array*) Unexecuted instantiation: v8::Local<v8::Module>::New(v8::Isolate*, v8::Module*) Unexecuted instantiation: v8::Local<v8::ArrayBuffer>::New(v8::Isolate*, v8::ArrayBuffer*) Unexecuted instantiation: v8::Local<v8::UnboundScript>::New(v8::Isolate*, v8::UnboundScript*) Unexecuted instantiation: v8::Local<v8::Promise>::New(v8::Isolate*, v8::Promise*) Unexecuted instantiation: v8::Local<v8::Promise::Resolver>::New(v8::Isolate*, v8::Promise::Resolver*) Unexecuted instantiation: v8::Local<v8::RegExp>::New(v8::Isolate*, v8::RegExp*) Unexecuted instantiation: v8::Local<v8::WasmMemoryObject>::New(v8::Isolate*, v8::WasmMemoryObject*) Unexecuted instantiation: v8::Local<v8::Map>::New(v8::Isolate*, v8::Map*) Unexecuted instantiation: v8::Local<v8::ArrayBufferView>::New(v8::Isolate*, v8::ArrayBufferView*) Unexecuted instantiation: v8::Local<v8::FunctionTemplate>::New(v8::Isolate*, v8::FunctionTemplate*) |
535 | | |
536 | | // Unsafe cast, should be avoided. |
537 | | template <class S> |
538 | 18.0k | V8_INLINE Local<S> UnsafeAs() const { |
539 | 18.0k | return Local<S>(LocalBase<S>(*this)); |
540 | 18.0k | } v8::Local<v8::Value> v8::Local<v8::DictionaryTemplate>::UnsafeAs<v8::Value>() const Line | Count | Source | 538 | 35 | V8_INLINE Local<S> UnsafeAs() const { | 539 | 35 | return Local<S>(LocalBase<S>(*this)); | 540 | 35 | } |
v8::Local<v8::Value> v8::Local<v8::FunctionTemplate>::UnsafeAs<v8::Value>() const Line | Count | Source | 538 | 280 | V8_INLINE Local<S> UnsafeAs() const { | 539 | 280 | return Local<S>(LocalBase<S>(*this)); | 540 | 280 | } |
v8::Local<v8::Value> v8::Local<v8::ObjectTemplate>::UnsafeAs<v8::Value>() const Line | Count | Source | 538 | 1.22k | V8_INLINE Local<S> UnsafeAs() const { | 539 | 1.22k | return Local<S>(LocalBase<S>(*this)); | 540 | 1.22k | } |
v8::Local<v8::Value> v8::Local<v8::Private>::UnsafeAs<v8::Value>() const Line | Count | Source | 538 | 2.80k | V8_INLINE Local<S> UnsafeAs() const { | 539 | 2.80k | return Local<S>(LocalBase<S>(*this)); | 540 | 2.80k | } |
v8::Local<v8::Value> v8::Local<v8::Symbol>::UnsafeAs<v8::Value>() const Line | Count | Source | 538 | 770 | V8_INLINE Local<S> UnsafeAs() const { | 539 | 770 | return Local<S>(LocalBase<S>(*this)); | 540 | 770 | } |
v8::Local<v8::Value> v8::Local<v8::String>::UnsafeAs<v8::Value>() const Line | Count | Source | 538 | 12.9k | V8_INLINE Local<S> UnsafeAs() const { | 539 | 12.9k | return Local<S>(LocalBase<S>(*this)); | 540 | 12.9k | } |
|
541 | | }; |
542 | | |
543 | | namespace internal { |
544 | | // A local variant that is suitable for off-stack allocation. |
545 | | // Used internally by LocalVector<T>. Not to be used directly! |
546 | | template <typename T> |
547 | | class V8_TRIVIAL_ABI LocalUnchecked : public Local<T> { |
548 | | public: |
549 | 0 | LocalUnchecked() : Local<T>(Local<T>::do_not_check) {}Unexecuted instantiation: v8::internal::LocalUnchecked<v8::Value>::LocalUnchecked() Unexecuted instantiation: v8::internal::LocalUnchecked<v8::Name>::LocalUnchecked() Unexecuted instantiation: v8::internal::LocalUnchecked<v8::String>::LocalUnchecked() |
550 | | |
551 | | #if defined(V8_ENABLE_LOCAL_OFF_STACK_CHECK) && V8_HAS_ATTRIBUTE_TRIVIAL_ABI |
552 | | // In this case, the check is also enforced in the copy constructor and we |
553 | | // need to suppress it. |
554 | | LocalUnchecked( |
555 | | const LocalUnchecked& other) noexcept // NOLINT(runtime/explicit) |
556 | | : Local<T>(other, Local<T>::do_not_check) {} |
557 | | LocalUnchecked& operator=(const LocalUnchecked&) noexcept = default; |
558 | | #endif |
559 | | |
560 | | // Implicit conversion from Local. |
561 | | LocalUnchecked(const Local<T>& other) noexcept // NOLINT(runtime/explicit) |
562 | 38.4k | : Local<T>(other, Local<T>::do_not_check) {}v8::internal::LocalUnchecked<v8::String>::LocalUnchecked(v8::Local<v8::String> const&) Line | Count | Source | 562 | 15.0k | : Local<T>(other, Local<T>::do_not_check) {} |
v8::internal::LocalUnchecked<v8::Name>::LocalUnchecked(v8::Local<v8::Name> const&) Line | Count | Source | 562 | 11.6k | : Local<T>(other, Local<T>::do_not_check) {} |
v8::internal::LocalUnchecked<v8::Value>::LocalUnchecked(v8::Local<v8::Value> const&) Line | Count | Source | 562 | 11.7k | : Local<T>(other, Local<T>::do_not_check) {} |
Unexecuted instantiation: v8::internal::LocalUnchecked<v8::Object>::LocalUnchecked(v8::Local<v8::Object> const&) Unexecuted instantiation: v8::internal::LocalUnchecked<v8::SharedArrayBuffer>::LocalUnchecked(v8::Local<v8::SharedArrayBuffer> const&) Unexecuted instantiation: v8::internal::LocalUnchecked<v8::ArrayBuffer>::LocalUnchecked(v8::Local<v8::ArrayBuffer> const&) |
563 | | }; |
564 | | |
565 | | #ifdef V8_ENABLE_DIRECT_HANDLE |
566 | | // Off-stack allocated direct locals must be registered as strong roots. |
567 | | // For off-stack indirect locals, this is not necessary. |
568 | | |
569 | | template <typename T> |
570 | | class StrongRootAllocator<LocalUnchecked<T>> : public StrongRootAllocatorBase { |
571 | | public: |
572 | | using value_type = LocalUnchecked<T>; |
573 | | static_assert(std::is_standard_layout_v<value_type>); |
574 | | static_assert(sizeof(value_type) == sizeof(Address)); |
575 | | |
576 | | template <typename HeapOrIsolateT> |
577 | | explicit StrongRootAllocator(HeapOrIsolateT* heap_or_isolate) |
578 | | : StrongRootAllocatorBase(heap_or_isolate) {} |
579 | | template <typename U> |
580 | | StrongRootAllocator(const StrongRootAllocator<U>& other) noexcept |
581 | | : StrongRootAllocatorBase(other) {} |
582 | | |
583 | | value_type* allocate(size_t n) { |
584 | | return reinterpret_cast<value_type*>(allocate_impl(n)); |
585 | | } |
586 | | void deallocate(value_type* p, size_t n) noexcept { |
587 | | return deallocate_impl(reinterpret_cast<Address*>(p), n); |
588 | | } |
589 | | }; |
590 | | #endif // V8_ENABLE_DIRECT_HANDLE |
591 | | } // namespace internal |
592 | | |
593 | | template <typename T> |
594 | | class LocalVector { |
595 | | private: |
596 | | using element_type = internal::LocalUnchecked<T>; |
597 | | |
598 | | #ifdef V8_ENABLE_DIRECT_HANDLE |
599 | | using allocator_type = internal::StrongRootAllocator<element_type>; |
600 | | |
601 | | static allocator_type make_allocator(Isolate* isolate) noexcept { |
602 | | return allocator_type(isolate); |
603 | | } |
604 | | #else |
605 | | using allocator_type = std::allocator<element_type>; |
606 | | |
607 | 5.18k | static allocator_type make_allocator(Isolate* isolate) noexcept { |
608 | 5.18k | return allocator_type(); |
609 | 5.18k | } v8::LocalVector<v8::Value>::make_allocator(v8::Isolate*) Line | Count | Source | 607 | 105 | static allocator_type make_allocator(Isolate* isolate) noexcept { | 608 | 105 | return allocator_type(); | 609 | 105 | } |
v8::LocalVector<v8::Name>::make_allocator(v8::Isolate*) Line | Count | Source | 607 | 70 | static allocator_type make_allocator(Isolate* isolate) noexcept { | 608 | 70 | return allocator_type(); | 609 | 70 | } |
v8::LocalVector<v8::String>::make_allocator(v8::Isolate*) Line | Count | Source | 607 | 5.00k | static allocator_type make_allocator(Isolate* isolate) noexcept { | 608 | 5.00k | return allocator_type(); | 609 | 5.00k | } |
Unexecuted instantiation: v8::LocalVector<v8::Object>::make_allocator(v8::Isolate*) Unexecuted instantiation: v8::LocalVector<v8::SharedArrayBuffer>::make_allocator(v8::Isolate*) Unexecuted instantiation: v8::LocalVector<v8::ArrayBuffer>::make_allocator(v8::Isolate*) |
610 | | #endif // V8_ENABLE_DIRECT_HANDLE |
611 | | |
612 | | using vector_type = std::vector<element_type, allocator_type>; |
613 | | |
614 | | public: |
615 | | using value_type = Local<T>; |
616 | | using reference = value_type&; |
617 | | using const_reference = const value_type&; |
618 | | using size_type = size_t; |
619 | | using difference_type = ptrdiff_t; |
620 | | using iterator = |
621 | | internal::WrappedIterator<typename vector_type::iterator, Local<T>>; |
622 | | using const_iterator = |
623 | | internal::WrappedIterator<typename vector_type::const_iterator, |
624 | | const Local<T>>; |
625 | | |
626 | 5.14k | explicit LocalVector(Isolate* isolate) : backing_(make_allocator(isolate)) {}v8::LocalVector<v8::String>::LocalVector(v8::Isolate*) Line | Count | Source | 626 | 4.97k | explicit LocalVector(Isolate* isolate) : backing_(make_allocator(isolate)) {} |
v8::LocalVector<v8::Value>::LocalVector(v8::Isolate*) Line | Count | Source | 626 | 105 | explicit LocalVector(Isolate* isolate) : backing_(make_allocator(isolate)) {} |
Unexecuted instantiation: v8::LocalVector<v8::Object>::LocalVector(v8::Isolate*) Unexecuted instantiation: v8::LocalVector<v8::SharedArrayBuffer>::LocalVector(v8::Isolate*) Unexecuted instantiation: v8::LocalVector<v8::ArrayBuffer>::LocalVector(v8::Isolate*) v8::LocalVector<v8::Name>::LocalVector(v8::Isolate*) Line | Count | Source | 626 | 70 | explicit LocalVector(Isolate* isolate) : backing_(make_allocator(isolate)) {} |
|
627 | | LocalVector(Isolate* isolate, size_t n) |
628 | 0 | : backing_(n, make_allocator(isolate)) {}Unexecuted instantiation: v8::LocalVector<v8::Value>::LocalVector(v8::Isolate*, unsigned long) Unexecuted instantiation: v8::LocalVector<v8::Name>::LocalVector(v8::Isolate*, unsigned long) Unexecuted instantiation: v8::LocalVector<v8::String>::LocalVector(v8::Isolate*, unsigned long) |
629 | | explicit LocalVector(Isolate* isolate, std::initializer_list<Local<T>> init) |
630 | 35 | : backing_(make_allocator(isolate)) { |
631 | 35 | if (init.size() == 0) return; |
632 | 35 | backing_.reserve(init.size()); |
633 | 35 | backing_.insert(backing_.end(), init.begin(), init.end()); |
634 | 35 | } Unexecuted instantiation: v8::LocalVector<v8::Name>::LocalVector(v8::Isolate*, std::initializer_list<v8::Local<v8::Name> >) Unexecuted instantiation: v8::LocalVector<v8::Value>::LocalVector(v8::Isolate*, std::initializer_list<v8::Local<v8::Value> >) v8::LocalVector<v8::String>::LocalVector(v8::Isolate*, std::initializer_list<v8::Local<v8::String> >) Line | Count | Source | 630 | 35 | : backing_(make_allocator(isolate)) { | 631 | 35 | if (init.size() == 0) return; | 632 | 35 | backing_.reserve(init.size()); | 633 | 35 | backing_.insert(backing_.end(), init.begin(), init.end()); | 634 | 35 | } |
|
635 | | |
636 | 0 | iterator begin() noexcept { return iterator(backing_.begin()); }Unexecuted instantiation: v8::LocalVector<v8::Message>::begin() Unexecuted instantiation: v8::LocalVector<v8::String>::begin() Unexecuted instantiation: v8::LocalVector<v8::Value>::begin() Unexecuted instantiation: v8::LocalVector<v8::ArrayBuffer>::begin() |
637 | | const_iterator begin() const noexcept { |
638 | | return const_iterator(backing_.begin()); |
639 | | } |
640 | 0 | iterator end() noexcept { return iterator(backing_.end()); }Unexecuted instantiation: v8::LocalVector<v8::Message>::end() Unexecuted instantiation: v8::LocalVector<v8::Value>::end() Unexecuted instantiation: v8::LocalVector<v8::ArrayBuffer>::end() |
641 | | const_iterator end() const noexcept { return const_iterator(backing_.end()); } |
642 | | |
643 | 2.73k | size_t size() const noexcept { return backing_.size(); }v8::LocalVector<v8::Value>::size() const Line | Count | Source | 643 | 70 | size_t size() const noexcept { return backing_.size(); } |
v8::LocalVector<v8::String>::size() const Line | Count | Source | 643 | 2.62k | size_t size() const noexcept { return backing_.size(); } |
Unexecuted instantiation: v8::LocalVector<v8::Message>::size() const v8::LocalVector<v8::Name>::size() const Line | Count | Source | 643 | 35 | size_t size() const noexcept { return backing_.size(); } |
Unexecuted instantiation: v8::LocalVector<v8::Object>::size() const Unexecuted instantiation: v8::LocalVector<v8::SharedArrayBuffer>::size() const Unexecuted instantiation: v8::LocalVector<v8::ArrayBuffer>::size() const |
644 | 0 | bool empty() const noexcept { return backing_.empty(); }Unexecuted instantiation: v8::LocalVector<v8::Message>::empty() const Unexecuted instantiation: v8::LocalVector<v8::Value>::empty() const |
645 | 2.66k | void reserve(size_t n) { backing_.reserve(n); }v8::LocalVector<v8::String>::reserve(unsigned long) Line | Count | Source | 645 | 2.59k | void reserve(size_t n) { backing_.reserve(n); } |
v8::LocalVector<v8::Value>::reserve(unsigned long) Line | Count | Source | 645 | 35 | void reserve(size_t n) { backing_.reserve(n); } |
v8::LocalVector<v8::Name>::reserve(unsigned long) Line | Count | Source | 645 | 35 | void reserve(size_t n) { backing_.reserve(n); } |
|
646 | | void shrink_to_fit() { backing_.shrink_to_fit(); } |
647 | | |
648 | 0 | Local<T>& operator[](size_t n) { return backing_[n]; }Unexecuted instantiation: v8::LocalVector<v8::Value>::operator[](unsigned long) Unexecuted instantiation: v8::LocalVector<v8::Name>::operator[](unsigned long) Unexecuted instantiation: v8::LocalVector<v8::String>::operator[](unsigned long) |
649 | 0 | const Local<T>& operator[](size_t n) const { return backing_[n]; } |
650 | | |
651 | | Local<T>& at(size_t n) { return backing_.at(n); } |
652 | | const Local<T>& at(size_t n) const { return backing_.at(n); } |
653 | | |
654 | | Local<T>& front() { return backing_.front(); } |
655 | | const Local<T>& front() const { return backing_.front(); } |
656 | | Local<T>& back() { return backing_.back(); } |
657 | | const Local<T>& back() const { return backing_.back(); } |
658 | | |
659 | 2.80k | Local<T>* data() noexcept { return backing_.data(); }v8::LocalVector<v8::Value>::data() Line | Count | Source | 659 | 105 | Local<T>* data() noexcept { return backing_.data(); } |
v8::LocalVector<v8::Name>::data() Line | Count | Source | 659 | 70 | Local<T>* data() noexcept { return backing_.data(); } |
v8::LocalVector<v8::String>::data() Line | Count | Source | 659 | 2.62k | Local<T>* data() noexcept { return backing_.data(); } |
Unexecuted instantiation: v8::LocalVector<v8::Object>::data() |
660 | | const Local<T>* data() const noexcept { return backing_.data(); } |
661 | | |
662 | | iterator insert(const_iterator pos, const Local<T>& value) { |
663 | | return iterator(backing_.insert(pos.base(), value)); |
664 | | } |
665 | | |
666 | | template <typename InputIt> |
667 | | iterator insert(const_iterator pos, InputIt first, InputIt last) { |
668 | | return iterator(backing_.insert(pos.base(), first, last)); |
669 | | } |
670 | | |
671 | | iterator insert(const_iterator pos, std::initializer_list<Local<T>> init) { |
672 | | return iterator(backing_.insert(pos.base(), init.begin(), init.end())); |
673 | | } |
674 | | |
675 | | LocalVector<T>& operator=(std::initializer_list<Local<T>> init) { |
676 | | backing_.clear(); |
677 | | backing_.reserve(init.size()); |
678 | | backing_.insert(backing_.end(), init.begin(), init.end()); |
679 | | return *this; |
680 | | } |
681 | | |
682 | 38.2k | void push_back(const Local<T>& x) { backing_.push_back(x); }v8::LocalVector<v8::String>::push_back(v8::Local<v8::String> const&) Line | Count | Source | 682 | 14.8k | void push_back(const Local<T>& x) { backing_.push_back(x); } |
v8::LocalVector<v8::Value>::push_back(v8::Local<v8::Value> const&) Line | Count | Source | 682 | 11.7k | void push_back(const Local<T>& x) { backing_.push_back(x); } |
Unexecuted instantiation: v8::LocalVector<v8::Object>::push_back(v8::Local<v8::Object> const&) Unexecuted instantiation: v8::LocalVector<v8::SharedArrayBuffer>::push_back(v8::Local<v8::SharedArrayBuffer> const&) Unexecuted instantiation: v8::LocalVector<v8::ArrayBuffer>::push_back(v8::Local<v8::ArrayBuffer> const&) v8::LocalVector<v8::Name>::push_back(v8::Local<v8::Name> const&) Line | Count | Source | 682 | 11.6k | void push_back(const Local<T>& x) { backing_.push_back(x); } |
|
683 | | void pop_back() { backing_.pop_back(); } |
684 | | |
685 | | template <typename... Args> |
686 | 0 | void emplace_back(Args&&... args) { |
687 | 0 | backing_.push_back(value_type{std::forward<Args>(args)...}); |
688 | 0 | } Unexecuted instantiation: void v8::LocalVector<v8::Value>::emplace_back<v8::Local<v8::Value>&>(v8::Local<v8::Value>&) Unexecuted instantiation: void v8::LocalVector<v8::Value>::emplace_back<v8::Local<v8::Integer> >(v8::Local<v8::Integer>&&) Unexecuted instantiation: void v8::LocalVector<v8::Value>::emplace_back<v8::Local<v8::Object> >(v8::Local<v8::Object>&&) Unexecuted instantiation: void v8::LocalVector<v8::Value>::emplace_back<v8::Local<v8::String> >(v8::Local<v8::String>&&) Unexecuted instantiation: void v8::LocalVector<v8::Value>::emplace_back<v8::Local<v8::Number> >(v8::Local<v8::Number>&&) Unexecuted instantiation: void v8::LocalVector<v8::Value>::emplace_back<v8::Local<v8::String>&>(v8::Local<v8::String>&) Unexecuted instantiation: void v8::LocalVector<v8::Value>::emplace_back<v8::Local<v8::Boolean> >(v8::Local<v8::Boolean>&&) Unexecuted instantiation: void v8::LocalVector<v8::Value>::emplace_back<v8::Local<v8::Object>&>(v8::Local<v8::Object>&) Unexecuted instantiation: void v8::LocalVector<v8::Value>::emplace_back<v8::Local<v8::Value> >(v8::Local<v8::Value>&&) Unexecuted instantiation: void v8::LocalVector<v8::Value>::emplace_back<v8::Local<v8::Array>&>(v8::Local<v8::Array>&) Unexecuted instantiation: void v8::LocalVector<v8::Name>::emplace_back<v8::Local<v8::Name>&>(v8::Local<v8::Name>&) |
689 | | |
690 | 0 | void clear() noexcept { backing_.clear(); } |
691 | | void resize(size_t n) { backing_.resize(n); } |
692 | | void swap(LocalVector<T>& other) { backing_.swap(other.backing_); } |
693 | | |
694 | | friend bool operator==(const LocalVector<T>& x, const LocalVector<T>& y) { |
695 | | return x.backing_ == y.backing_; |
696 | | } |
697 | | friend bool operator!=(const LocalVector<T>& x, const LocalVector<T>& y) { |
698 | | return x.backing_ != y.backing_; |
699 | | } |
700 | | friend bool operator<(const LocalVector<T>& x, const LocalVector<T>& y) { |
701 | | return x.backing_ < y.backing_; |
702 | | } |
703 | | friend bool operator>(const LocalVector<T>& x, const LocalVector<T>& y) { |
704 | | return x.backing_ > y.backing_; |
705 | | } |
706 | | friend bool operator<=(const LocalVector<T>& x, const LocalVector<T>& y) { |
707 | | return x.backing_ <= y.backing_; |
708 | | } |
709 | | friend bool operator>=(const LocalVector<T>& x, const LocalVector<T>& y) { |
710 | | return x.backing_ >= y.backing_; |
711 | | } |
712 | | |
713 | | private: |
714 | | vector_type backing_; |
715 | | }; |
716 | | |
717 | | #if !defined(V8_IMMINENT_DEPRECATION_WARNINGS) |
718 | | // Handle is an alias for Local for historical reasons. |
719 | | template <class T> |
720 | | using Handle = Local<T>; |
721 | | #endif |
722 | | |
723 | | /** |
724 | | * A MaybeLocal<> is a wrapper around Local<> that enforces a check whether |
725 | | * the Local<> is empty before it can be used. |
726 | | * |
727 | | * If an API method returns a MaybeLocal<>, the API method can potentially fail |
728 | | * either because an exception is thrown, or because an exception is pending, |
729 | | * e.g. because a previous API call threw an exception that hasn't been caught |
730 | | * yet, or because a TerminateExecution exception was thrown. In that case, an |
731 | | * empty MaybeLocal is returned. |
732 | | */ |
733 | | template <class T> |
734 | | class MaybeLocal { |
735 | | public: |
736 | | /** |
737 | | * Default constructor: Returns an empty handle. |
738 | | */ |
739 | 181 | V8_INLINE MaybeLocal() = default; v8::MaybeLocal<v8::Value>::MaybeLocal() Line | Count | Source | 739 | 35 | V8_INLINE MaybeLocal() = default; |
Unexecuted instantiation: v8::MaybeLocal<v8::Object>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Context>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Private>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Symbol>::MaybeLocal() v8::MaybeLocal<v8::String>::MaybeLocal() Line | Count | Source | 739 | 146 | V8_INLINE MaybeLocal() = default; |
Unexecuted instantiation: v8::MaybeLocal<v8::DictionaryTemplate>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::FunctionTemplate>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::ObjectTemplate>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Uint32Array>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Uint8Array>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Float64Array>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Array>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Int32Array>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Module>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Promise>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Data>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Function>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::StackTrace>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::BigInt64Array>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::Name>::MaybeLocal() Unexecuted instantiation: v8::MaybeLocal<v8::ArrayBufferView>::MaybeLocal() |
740 | | /** |
741 | | * Implicitly construct MaybeLocal from Local. |
742 | | */ |
743 | | template <class S> |
744 | | requires std::is_base_of_v<T, S> |
745 | 32.4k | V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}_ZN2v810MaybeLocalINS_6ObjectEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Line | Count | Source | 745 | 245 | V8_INLINE MaybeLocal(Local<S> that) : local_(that) {} |
_ZN2v810MaybeLocalINS_5ValueEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Line | Count | Source | 745 | 455 | V8_INLINE MaybeLocal(Local<S> that) : local_(that) {} |
_ZN2v810MaybeLocalINS_5ValueEEC2INS_6StringEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE Line | Count | Source | 745 | 25.9k | V8_INLINE MaybeLocal(Local<S> that) : local_(that) {} |
_ZN2v810MaybeLocalINS_14ObjectTemplateEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Line | Count | Source | 745 | 35 | V8_INLINE MaybeLocal(Local<S> that) : local_(that) {} |
Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_9PrimitiveEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_7PrivateEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_6SymbolEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_6StringEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_18DictionaryTemplateEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_16FunctionTemplateEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_11Uint32ArrayEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_10Uint8ArrayEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_12Float64ArrayEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ArrayEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_10Int32ArrayEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_7PromiseEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_6ModuleEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_7PromiseEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_6ObjectEEC2INS_10Uint8ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE _ZN2v810MaybeLocalINS_4DataEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Line | Count | Source | 745 | 2.59k | V8_INLINE MaybeLocal(Local<S> that) : local_(that) {} |
_ZN2v810MaybeLocalINS_8FunctionEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Line | Count | Source | 745 | 2.41k | V8_INLINE MaybeLocal(Local<S> that) : local_(that) {} |
Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_3SetEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE _ZN2v810MaybeLocalINS_5ValueEEC2INS_5ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE Line | Count | Source | 745 | 700 | V8_INLINE MaybeLocal(Local<S> that) : local_(that) {} |
Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_6ObjectEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE _ZN2v810MaybeLocalINS_5ValueEEC2INS_7BooleanEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE Line | Count | Source | 745 | 105 | V8_INLINE MaybeLocal(Local<S> that) : local_(that) {} |
Unexecuted instantiation: _ZN2v810MaybeLocalINS_7ContextEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_8FunctionEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_10StackTraceEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_13BigInt64ArrayEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_17SharedArrayBufferEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_6SymbolEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_3MapEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_7IntegerEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_6NumberEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_6BigIntEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_10Uint8ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_4NameEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_15ArrayBufferViewEEC2IS1_Qsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS4_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_11ArrayBufferEQsr3stdE12is_base_of_vIT_TL0__EEENS_5LocalIS5_EE |
746 | | /** |
747 | | * Implicitly up-cast MaybeLocal<S> to MaybeLocal<T> if T is a base of S. |
748 | | */ |
749 | | template <class S> |
750 | | requires std::is_base_of_v<T, S> |
751 | 0 | V8_INLINE MaybeLocal(MaybeLocal<S> that) : local_(that.local_) {}Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_6ObjectEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_5ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_4NameEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE Unexecuted instantiation: _ZN2v810MaybeLocalINS_5ValueEEC2INS_10Uint8ArrayEQsr3stdE12is_base_of_vIT_TL0__EEENS0_IS5_EE |
752 | | |
753 | 1.43M | V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }v8::MaybeLocal<v8::String>::IsEmpty() const Line | Count | Source | 753 | 607k | V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); } |
v8::MaybeLocal<v8::Value>::IsEmpty() const Line | Count | Source | 753 | 214k | V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); } |
v8::MaybeLocal<v8::Function>::IsEmpty() const Line | Count | Source | 753 | 9.94k | V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); } |
v8::MaybeLocal<v8::Script>::IsEmpty() const Line | Count | Source | 753 | 34.9k | V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); } |
v8::MaybeLocal<v8::Object>::IsEmpty() const Line | Count | Source | 753 | 532k | V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); } |
v8::MaybeLocal<v8::Context>::IsEmpty() const Line | Count | Source | 753 | 2 | 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::DictionaryTemplate>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::FunctionTemplate>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::ObjectTemplate>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::Uint32Array>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::Uint8Array>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::Float64Array>::IsEmpty() const v8::MaybeLocal<v8::Array>::IsEmpty() const Line | Count | Source | 753 | 30.3k | 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 v8::MaybeLocal<v8::Data>::IsEmpty() const Line | Count | Source | 753 | 2.59k | V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); } |
Unexecuted instantiation: v8::MaybeLocal<v8::Set>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::UnboundScript>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::StackTrace>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::Promise>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::BigInt64Array>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::Map>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::RegExp>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::SharedArrayBuffer>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::Name>::IsEmpty() const 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::Uint32>::IsEmpty() const Unexecuted instantiation: v8::MaybeLocal<v8::Int32>::IsEmpty() const |
754 | | |
755 | | /** |
756 | | * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty, |
757 | | * |false| is returned and |out| is assigned with nullptr. |
758 | | */ |
759 | | template <class S> |
760 | 90.5k | V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const { |
761 | 90.5k | *out = local_; |
762 | 90.5k | return !IsEmpty(); |
763 | 90.5k | } bool v8::MaybeLocal<v8::Value>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const Line | Count | Source | 760 | 44.2k | V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const { | 761 | 44.2k | *out = local_; | 762 | 44.2k | return !IsEmpty(); | 763 | 44.2k | } |
bool v8::MaybeLocal<v8::String>::ToLocal<v8::String>(v8::Local<v8::String>*) const Line | Count | Source | 760 | 13.3k | V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const { | 761 | 13.3k | *out = local_; | 762 | 13.3k | return !IsEmpty(); | 763 | 13.3k | } |
bool v8::MaybeLocal<v8::Script>::ToLocal<v8::Script>(v8::Local<v8::Script>*) const Line | Count | Source | 760 | 9.65k | V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const { | 761 | 9.65k | *out = local_; | 762 | 9.65k | return !IsEmpty(); | 763 | 9.65k | } |
bool v8::MaybeLocal<v8::Function>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const Line | Count | Source | 760 | 70 | V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const { | 761 | 70 | *out = local_; | 762 | 70 | return !IsEmpty(); | 763 | 70 | } |
bool v8::MaybeLocal<v8::Object>::ToLocal<v8::Object>(v8::Local<v8::Object>*) const Line | Count | Source | 760 | 15.4k | V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const { | 761 | 15.4k | *out = local_; | 762 | 15.4k | return !IsEmpty(); | 763 | 15.4k | } |
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 Unexecuted instantiation: bool v8::MaybeLocal<v8::DictionaryTemplate>::ToLocal<v8::DictionaryTemplate>(v8::Local<v8::DictionaryTemplate>*) const 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::Object>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const bool v8::MaybeLocal<v8::String>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const Line | Count | Source | 760 | 140 | V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const { | 761 | 140 | *out = local_; | 762 | 140 | return !IsEmpty(); | 763 | 140 | } |
Unexecuted instantiation: bool v8::MaybeLocal<v8::Array>::ToLocal<v8::Array>(v8::Local<v8::Array>*) const bool v8::MaybeLocal<v8::Context>::ToLocal<v8::Context>(v8::Local<v8::Context>*) const Line | Count | Source | 760 | 2 | V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const { | 761 | 2 | *out = local_; | 762 | 2 | return !IsEmpty(); | 763 | 2 | } |
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 | 760 | 5.04k | V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const { | 761 | 5.04k | *out = local_; | 762 | 5.04k | return !IsEmpty(); | 763 | 5.04k | } |
Unexecuted instantiation: bool v8::MaybeLocal<v8::Uint8Array>::ToLocal<v8::Object>(v8::Local<v8::Object>*) const Unexecuted instantiation: bool v8::MaybeLocal<v8::Uint8Array>::ToLocal<v8::Uint8Array>(v8::Local<v8::Uint8Array>*) const bool v8::MaybeLocal<v8::Data>::ToLocal<v8::Data>(v8::Local<v8::Data>*) const Line | Count | Source | 760 | 2.59k | V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local<S>* out) const { | 761 | 2.59k | *out = local_; | 762 | 2.59k | return !IsEmpty(); | 763 | 2.59k | } |
Unexecuted instantiation: bool v8::MaybeLocal<v8::UnboundScript>::ToLocal<v8::UnboundScript>(v8::Local<v8::UnboundScript>*) const 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 Unexecuted instantiation: bool v8::MaybeLocal<v8::RegExp>::ToLocal<v8::RegExp>(v8::Local<v8::RegExp>*) const Unexecuted instantiation: bool v8::MaybeLocal<v8::SharedArrayBuffer>::ToLocal<v8::SharedArrayBuffer>(v8::Local<v8::SharedArrayBuffer>*) const Unexecuted instantiation: bool v8::MaybeLocal<v8::Uint8Array>::ToLocal<v8::Value>(v8::Local<v8::Value>*) const Unexecuted instantiation: bool v8::MaybeLocal<v8::Name>::ToLocal<v8::Name>(v8::Local<v8::Name>*) const Unexecuted instantiation: bool v8::MaybeLocal<v8::Uint32>::ToLocal<v8::Uint32>(v8::Local<v8::Uint32>*) const Unexecuted instantiation: bool v8::MaybeLocal<v8::Int32>::ToLocal<v8::Int32>(v8::Local<v8::Int32>*) const |
764 | | |
765 | | /** |
766 | | * Converts this MaybeLocal<> to a Local<>. If this MaybeLocal<> is empty, |
767 | | * V8 will crash the process. |
768 | | */ |
769 | 682k | V8_INLINE Local<T> ToLocalChecked() { |
770 | 682k | if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty(); |
771 | 682k | return local_; |
772 | 682k | } v8::MaybeLocal<v8::String>::ToLocalChecked() Line | Count | Source | 769 | 309k | V8_INLINE Local<T> ToLocalChecked() { | 770 | 309k | if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty(); | 771 | 309k | return local_; | 772 | 309k | } |
v8::MaybeLocal<v8::Value>::ToLocalChecked() Line | Count | Source | 769 | 83.4k | V8_INLINE Local<T> ToLocalChecked() { | 770 | 83.4k | if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty(); | 771 | 83.4k | return local_; | 772 | 83.4k | } |
v8::MaybeLocal<v8::Function>::ToLocalChecked() Line | Count | Source | 769 | 4.83k | V8_INLINE Local<T> ToLocalChecked() { | 770 | 4.83k | if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty(); | 771 | 4.83k | return local_; | 772 | 4.83k | } |
v8::MaybeLocal<v8::Object>::ToLocalChecked() Line | Count | Source | 769 | 259k | V8_INLINE Local<T> ToLocalChecked() { | 770 | 259k | if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty(); | 771 | 259k | return local_; | 772 | 259k | } |
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 | 769 | 15.1k | V8_INLINE Local<T> ToLocalChecked() { | 770 | 15.1k | if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty(); | 771 | 15.1k | return local_; | 772 | 15.1k | } |
Unexecuted instantiation: v8::MaybeLocal<v8::Int32Array>::ToLocalChecked() Unexecuted instantiation: v8::MaybeLocal<v8::Module>::ToLocalChecked() Unexecuted instantiation: v8::MaybeLocal<v8::Data>::ToLocalChecked() Unexecuted instantiation: v8::MaybeLocal<v8::BigInt64Array>::ToLocalChecked() Unexecuted instantiation: v8::MaybeLocal<v8::BigInt>::ToLocalChecked() Unexecuted instantiation: v8::MaybeLocal<v8::Number>::ToLocalChecked() Unexecuted instantiation: v8::MaybeLocal<v8::Promise::Resolver>::ToLocalChecked() v8::MaybeLocal<v8::Script>::ToLocalChecked() Line | Count | Source | 769 | 10.1k | V8_INLINE Local<T> ToLocalChecked() { | 770 | 10.1k | if (V8_UNLIKELY(IsEmpty())) api_internal::ToLocalEmpty(); | 771 | 10.1k | return local_; | 772 | 10.1k | } |
|
773 | | |
774 | | /** |
775 | | * Converts this MaybeLocal<> to a Local<>, using a default value if this |
776 | | * MaybeLocal<> is empty. |
777 | | */ |
778 | | template <class S> |
779 | 26.2k | V8_INLINE Local<S> FromMaybe(Local<S> default_value) const { |
780 | 26.2k | return IsEmpty() ? default_value : Local<S>(local_); |
781 | 26.2k | } v8::Local<v8::String> v8::MaybeLocal<v8::String>::FromMaybe<v8::String>(v8::Local<v8::String>) const Line | Count | Source | 779 | 25.9k | V8_INLINE Local<S> FromMaybe(Local<S> default_value) const { | 780 | 25.9k | return IsEmpty() ? default_value : Local<S>(local_); | 781 | 25.9k | } |
Unexecuted instantiation: v8::Local<v8::Value> v8::MaybeLocal<v8::String>::FromMaybe<v8::Value>(v8::Local<v8::Value>) const v8::Local<v8::Value> v8::MaybeLocal<v8::Value>::FromMaybe<v8::Value>(v8::Local<v8::Value>) const Line | Count | Source | 779 | 315 | V8_INLINE Local<S> FromMaybe(Local<S> default_value) const { | 780 | 315 | return IsEmpty() ? default_value : Local<S>(local_); | 781 | 315 | } |
Unexecuted instantiation: v8::Local<v8::Module> v8::MaybeLocal<v8::Module>::FromMaybe<v8::Module>(v8::Local<v8::Module>) const v8::Local<v8::Object> v8::MaybeLocal<v8::Object>::FromMaybe<v8::Object>(v8::Local<v8::Object>) const Line | Count | Source | 779 | 35 | V8_INLINE Local<S> FromMaybe(Local<S> default_value) const { | 780 | 35 | return IsEmpty() ? default_value : Local<S>(local_); | 781 | 35 | } |
Unexecuted instantiation: v8::Local<v8::Uint8Array> v8::MaybeLocal<v8::Uint8Array>::FromMaybe<v8::Uint8Array>(v8::Local<v8::Uint8Array>) const Unexecuted instantiation: v8::Local<v8::Function> v8::MaybeLocal<v8::Function>::FromMaybe<v8::Function>(v8::Local<v8::Function>) const Unexecuted instantiation: v8::Local<v8::Value> v8::MaybeLocal<v8::Uint8Array>::FromMaybe<v8::Value>(v8::Local<v8::Value>) const Unexecuted instantiation: v8::Local<v8::Value> v8::MaybeLocal<v8::Object>::FromMaybe<v8::Value>(v8::Local<v8::Value>) const Unexecuted instantiation: v8::Local<v8::ArrayBufferView> v8::MaybeLocal<v8::ArrayBufferView>::FromMaybe<v8::ArrayBufferView>(v8::Local<v8::ArrayBufferView>) const Unexecuted instantiation: v8::Local<v8::Object> v8::MaybeLocal<v8::Uint8Array>::FromMaybe<v8::Object>(v8::Local<v8::Object>) const |
782 | | |
783 | | /** |
784 | | * Cast a handle to a subclass, e.g. MaybeLocal<Value> to MaybeLocal<Object>. |
785 | | * This is only valid if the handle actually refers to a value of the target |
786 | | * type or if the handle is empty. |
787 | | */ |
788 | | template <class S> |
789 | 0 | V8_INLINE static MaybeLocal<T> Cast(MaybeLocal<S> that) { |
790 | 0 | return MaybeLocal<T>{Local<T>::Cast(that.local_)}; |
791 | 0 | } Unexecuted instantiation: v8::MaybeLocal<v8::Value> v8::MaybeLocal<v8::Value>::Cast<v8::String>(v8::MaybeLocal<v8::String>) Unexecuted instantiation: v8::MaybeLocal<v8::Name> v8::MaybeLocal<v8::Name>::Cast<v8::String>(v8::MaybeLocal<v8::String>) |
792 | | |
793 | | /** |
794 | | * Calling this is equivalent to MaybeLocal<S>::Cast(). |
795 | | * In particular, this is only valid if the handle actually refers to a value |
796 | | * of the target type or if the handle is empty. |
797 | | */ |
798 | | template <class S> |
799 | 0 | V8_INLINE MaybeLocal<S> As() const { |
800 | 0 | return MaybeLocal<S>::Cast(*this); |
801 | 0 | } Unexecuted instantiation: v8::MaybeLocal<v8::Value> v8::MaybeLocal<v8::String>::As<v8::Value>() const Unexecuted instantiation: v8::MaybeLocal<v8::Name> v8::MaybeLocal<v8::String>::As<v8::Name>() const |
802 | | |
803 | | private: |
804 | | Local<T> local_; |
805 | | |
806 | | template <typename S> |
807 | | friend class MaybeLocal; |
808 | | }; |
809 | | |
810 | | /** |
811 | | * A HandleScope which first allocates a handle in the current scope |
812 | | * which will be later filled with the escape value. |
813 | | */ |
814 | | class V8_EXPORT V8_NODISCARD EscapableHandleScopeBase : public HandleScope { |
815 | | public: |
816 | | explicit EscapableHandleScopeBase(Isolate* isolate); |
817 | | V8_INLINE ~EscapableHandleScopeBase() = default; |
818 | | |
819 | | EscapableHandleScopeBase(const EscapableHandleScopeBase&) = delete; |
820 | | void operator=(const EscapableHandleScopeBase&) = delete; |
821 | | void* operator new(size_t size) = delete; |
822 | | void* operator new[](size_t size) = delete; |
823 | | void operator delete(void*, size_t) = delete; |
824 | | void operator delete[](void*, size_t) = delete; |
825 | | |
826 | | protected: |
827 | | /** |
828 | | * Pushes the value into the previous scope and returns a handle to it. |
829 | | * Cannot be called twice. |
830 | | */ |
831 | | internal::Address* EscapeSlot(internal::Address* escape_value); |
832 | | |
833 | | private: |
834 | | internal::Address* escape_slot_; |
835 | | }; |
836 | | |
837 | | class V8_EXPORT V8_NODISCARD EscapableHandleScope |
838 | | : public EscapableHandleScopeBase { |
839 | | public: |
840 | | explicit EscapableHandleScope(Isolate* isolate) |
841 | 5.07k | : EscapableHandleScopeBase(isolate) {} |
842 | | V8_INLINE ~EscapableHandleScope() = default; |
843 | | template <class T> |
844 | 5.07k | V8_INLINE Local<T> Escape(Local<T> value) { |
845 | | #ifdef V8_ENABLE_DIRECT_HANDLE |
846 | | return value; |
847 | | #else |
848 | 5.07k | if (value.IsEmpty()) return value; |
849 | 5.07k | return Local<T>::FromSlot(EscapeSlot(value.slot())); |
850 | 5.07k | #endif |
851 | 5.07k | } v8::Local<v8::Object> v8::EscapableHandleScope::Escape<v8::Object>(v8::Local<v8::Object>) Line | Count | Source | 844 | 1.40k | V8_INLINE Local<T> Escape(Local<T> value) { | 845 | | #ifdef V8_ENABLE_DIRECT_HANDLE | 846 | | return value; | 847 | | #else | 848 | 1.40k | if (value.IsEmpty()) return value; | 849 | 1.40k | return Local<T>::FromSlot(EscapeSlot(value.slot())); | 850 | 1.40k | #endif | 851 | 1.40k | } |
v8::Local<v8::Value> v8::EscapableHandleScope::Escape<v8::Value>(v8::Local<v8::Value>) Line | Count | Source | 844 | 350 | V8_INLINE Local<T> Escape(Local<T> value) { | 845 | | #ifdef V8_ENABLE_DIRECT_HANDLE | 846 | | return value; | 847 | | #else | 848 | 350 | if (value.IsEmpty()) return value; | 849 | 350 | return Local<T>::FromSlot(EscapeSlot(value.slot())); | 850 | 350 | #endif | 851 | 350 | } |
Unexecuted instantiation: v8::Local<v8::Primitive> v8::EscapableHandleScope::Escape<v8::Primitive>(v8::Local<v8::Primitive>) v8::Local<v8::Array> v8::EscapableHandleScope::Escape<v8::Array>(v8::Local<v8::Array>) Line | Count | Source | 844 | 700 | V8_INLINE Local<T> Escape(Local<T> value) { | 845 | | #ifdef V8_ENABLE_DIRECT_HANDLE | 846 | | return value; | 847 | | #else | 848 | 700 | if (value.IsEmpty()) return value; | 849 | 700 | return Local<T>::FromSlot(EscapeSlot(value.slot())); | 850 | 700 | #endif | 851 | 700 | } |
Unexecuted instantiation: v8::Local<v8::Promise> v8::EscapableHandleScope::Escape<v8::Promise>(v8::Local<v8::Promise>) Unexecuted instantiation: v8::Local<v8::Module> v8::EscapableHandleScope::Escape<v8::Module>(v8::Local<v8::Module>) Unexecuted instantiation: v8::Local<v8::Uint8Array> v8::EscapableHandleScope::Escape<v8::Uint8Array>(v8::Local<v8::Uint8Array>) v8::Local<v8::Data> v8::EscapableHandleScope::Escape<v8::Data>(v8::Local<v8::Data>) Line | Count | Source | 844 | 2.59k | V8_INLINE Local<T> Escape(Local<T> value) { | 845 | | #ifdef V8_ENABLE_DIRECT_HANDLE | 846 | | return value; | 847 | | #else | 848 | 2.59k | if (value.IsEmpty()) return value; | 849 | 2.59k | return Local<T>::FromSlot(EscapeSlot(value.slot())); | 850 | 2.59k | #endif | 851 | 2.59k | } |
v8::Local<v8::Function> v8::EscapableHandleScope::Escape<v8::Function>(v8::Local<v8::Function>) Line | Count | Source | 844 | 35 | V8_INLINE Local<T> Escape(Local<T> value) { | 845 | | #ifdef V8_ENABLE_DIRECT_HANDLE | 846 | | return value; | 847 | | #else | 848 | 35 | if (value.IsEmpty()) return value; | 849 | 35 | return Local<T>::FromSlot(EscapeSlot(value.slot())); | 850 | 35 | #endif | 851 | 35 | } |
Unexecuted instantiation: v8::Local<v8::Context> v8::EscapableHandleScope::Escape<v8::Context>(v8::Local<v8::Context>) Unexecuted instantiation: v8::Local<v8::StackTrace> v8::EscapableHandleScope::Escape<v8::StackTrace>(v8::Local<v8::StackTrace>) Unexecuted instantiation: v8::Local<v8::Integer> v8::EscapableHandleScope::Escape<v8::Integer>(v8::Local<v8::Integer>) Unexecuted instantiation: v8::Local<v8::Map> v8::EscapableHandleScope::Escape<v8::Map>(v8::Local<v8::Map>) |
852 | | |
853 | | template <class T> |
854 | 315 | V8_INLINE MaybeLocal<T> EscapeMaybe(MaybeLocal<T> value) { |
855 | 315 | return Escape(value.FromMaybe(Local<T>())); |
856 | 315 | } v8::MaybeLocal<v8::Value> v8::EscapableHandleScope::EscapeMaybe<v8::Value>(v8::MaybeLocal<v8::Value>) Line | Count | Source | 854 | 315 | V8_INLINE MaybeLocal<T> EscapeMaybe(MaybeLocal<T> value) { | 855 | 315 | return Escape(value.FromMaybe(Local<T>())); | 856 | 315 | } |
Unexecuted instantiation: v8::MaybeLocal<v8::Module> v8::EscapableHandleScope::EscapeMaybe<v8::Module>(v8::MaybeLocal<v8::Module>) Unexecuted instantiation: v8::MaybeLocal<v8::Object> v8::EscapableHandleScope::EscapeMaybe<v8::Object>(v8::MaybeLocal<v8::Object>) Unexecuted instantiation: v8::MaybeLocal<v8::Function> v8::EscapableHandleScope::EscapeMaybe<v8::Function>(v8::MaybeLocal<v8::Function>) |
857 | | }; |
858 | | |
859 | | /** |
860 | | * A SealHandleScope acts like a handle scope in which no handle allocations |
861 | | * are allowed. It can be useful for debugging handle leaks. |
862 | | * Handles can be allocated within inner normal HandleScopes. |
863 | | */ |
864 | | class V8_EXPORT V8_NODISCARD SealHandleScope { |
865 | | public: |
866 | | explicit SealHandleScope(Isolate* isolate); |
867 | | ~SealHandleScope(); |
868 | | |
869 | | SealHandleScope(const SealHandleScope&) = delete; |
870 | | void operator=(const SealHandleScope&) = delete; |
871 | | void* operator new(size_t size) = delete; |
872 | | void* operator new[](size_t size) = delete; |
873 | | void operator delete(void*, size_t) = delete; |
874 | | void operator delete[](void*, size_t) = delete; |
875 | | |
876 | | private: |
877 | | internal::Isolate* const i_isolate_; |
878 | | internal::Address* prev_limit_; |
879 | | int prev_sealed_level_; |
880 | | }; |
881 | | |
882 | | } // namespace v8 |
883 | | |
884 | | #endif // INCLUDE_V8_LOCAL_HANDLE_H_ |