v8 12.4.254 (node 22.4.1)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
v8-local-handle.h
Go to the documentation of this file.
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
16namespace v8 {
17
18template <class T>
19class LocalBase;
20template <class T>
21class Local;
22template <class T>
23class LocalVector;
24template <class F>
25class MaybeLocal;
26
27template <class T>
28class Eternal;
29template <class T>
30class Global;
31
32template <class T>
33class NonCopyablePersistentTraits;
34template <class T>
35class PersistentBase;
36template <class T, class M = NonCopyablePersistentTraits<T>>
37class Persistent;
38
39class TracedReferenceBase;
40template <class T>
41class BasicTracedReference;
42template <class F>
43class TracedReference;
44
45class Boolean;
46class Context;
47class EscapableHandleScope;
48template <class F>
49class FunctionCallbackInfo;
50class Isolate;
51class Object;
52template <class F1, class F2, class F3>
53class PersistentValueMapBase;
54template <class F1, class F2>
56class Primitive;
57class Private;
58template <class F>
60template <class F>
61class ReturnValue;
62class String;
63template <class F>
64class Traced;
66class Utils;
67
68namespace debug {
69class ConsoleCallArguments;
70}
71
72namespace internal {
73template <typename T>
75template <typename T>
76class LocalUnchecked;
77class SamplingHeapProfiler;
78} // namespace internal
79
80namespace api_internal {
81// Called when ToLocalChecked is called on an empty Local.
83} // namespace api_internal
84
100 public:
101 explicit HandleScope(Isolate* isolate);
102
104
108 static int NumberOfHandles(Isolate* isolate);
109
111 return reinterpret_cast<Isolate*>(i_isolate_);
112 }
113
114 HandleScope(const HandleScope&) = delete;
115 void operator=(const HandleScope&) = delete;
116
118 internal::Address value);
119
120 protected:
122
123 void Initialize(Isolate* isolate);
124
125 static internal::Address* CreateHandle(internal::Isolate* i_isolate,
126 internal::Address value);
127
128 private:
129 // Declaring operator new and delete as deleted is not spec compliant.
130 // Therefore declare them private instead to disable dynamic alloc
131 void* operator new(size_t size);
132 void* operator new[](size_t size);
133 void operator delete(void*, size_t);
134 void operator delete[](void*, size_t);
135
136 internal::Isolate* i_isolate_;
137 internal::Address* prev_next_;
138 internal::Address* prev_limit_;
139#ifdef V8_ENABLE_CHECKS
140 int scope_level_ = 0;
141#endif
142
143 // LocalBase<T>::New uses CreateHandle with an Isolate* parameter.
144 template <typename T>
145 friend class LocalBase;
146
147 // Object::GetInternalField and Context::GetEmbedderData use CreateHandle with
148 // a HeapObject in their shortcuts.
149 friend class Object;
150 friend class Context;
151};
152
159#ifdef V8_ENABLE_DIRECT_LOCAL
160
161template <typename T>
162class LocalBase : public api_internal::DirectHandleBase {
163 protected:
164 template <class F>
165 friend class Local;
166
167 V8_INLINE LocalBase() = default;
168
169 V8_INLINE explicit LocalBase(internal::Address ptr) : DirectHandleBase(ptr) {}
170
171 template <typename S>
172 V8_INLINE LocalBase(const LocalBase<S>& other) : DirectHandleBase(other) {}
173
174 V8_INLINE static LocalBase<T> New(Isolate* isolate, internal::Address value) {
175 return LocalBase<T>(value);
176 }
177
178 V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
179 return LocalBase<T>::New(isolate,
181 }
182
183 V8_INLINE static LocalBase<T> FromSlot(internal::Address* slot) {
184 return LocalBase<T>(*slot);
185 }
186};
187
188#else // !V8_ENABLE_DIRECT_LOCAL
189
190template <typename T>
192 protected:
193 template <class F>
194 friend class Local;
195
196 V8_INLINE LocalBase() = default;
197
199 : IndirectHandleBase(location) {}
200
201 template <typename S>
203
206 reinterpret_cast<internal::Isolate*>(isolate), value));
207 }
208
209 V8_INLINE static LocalBase<T> New(Isolate* isolate, T* that) {
211 return LocalBase<T>::New(isolate,
213 }
214
216 return LocalBase<T>(slot);
217 }
218};
219
220#endif // V8_ENABLE_DIRECT_LOCAL
221
251template <class T>
253#ifdef V8_ENABLE_LOCAL_OFF_STACK_CHECK
255#else
256 public api_internal::StackAllocated<false>
257#endif
258{
259 public:
260 V8_INLINE Local() = default;
261
262 template <class S>
269 static_assert(std::is_base_of<T, S>::value, "type check");
270 }
271
272 V8_INLINE T* operator->() const { return this->template value<T>(); }
273
274 V8_INLINE T* operator*() const { return this->operator->(); }
275
287 template <class S>
288 V8_INLINE bool operator==(const Local<S>& that) const {
289 return internal::HandleHelper::EqualHandles(*this, that);
290 }
291
292 template <class S>
293 V8_INLINE bool operator==(const PersistentBase<S>& that) const {
294 return internal::HandleHelper::EqualHandles(*this, that);
295 }
296
297 template <class S>
298 V8_INLINE bool operator!=(const Local<S>& that) const {
299 return !operator==(that);
300 }
301
302 template <class S>
303 V8_INLINE bool operator!=(const Persistent<S>& that) const {
304 return !operator==(that);
305 }
306
312 template <class S>
314#ifdef V8_ENABLE_CHECKS
315 // If we're going to perform the type check then we have to check
316 // that the handle isn't empty before doing the checked cast.
317 if (that.IsEmpty()) return Local<T>();
318 T::Cast(that.template value<S>());
319#endif
320 return Local<T>(LocalBase<T>(that));
321 }
322
328 template <class S>
330 return Local<S>::Cast(*this);
331 }
332
338 V8_INLINE static Local<T> New(Isolate* isolate, Local<T> that) {
339 return New(isolate, that.template value<T, true>());
340 }
341
342 V8_INLINE static Local<T> New(Isolate* isolate,
343 const PersistentBase<T>& that) {
344 return New(isolate, that.template value<T, true>());
345 }
346
347 V8_INLINE static Local<T> New(Isolate* isolate,
348 const BasicTracedReference<T>& that) {
349 return New(isolate, that.template value<T, true>());
350 }
351
352 private:
354 friend class Utils;
355 template <class F>
356 friend class Eternal;
357 template <class F>
358 friend class Global;
359 template <class F>
360 friend class Local;
361 template <class F>
362 friend class MaybeLocal;
363 template <class F, class M>
364 friend class Persistent;
365 template <class F>
367 template <class F>
369 friend class String;
370 friend class Object;
371 friend class Context;
372 friend class Isolate;
373 friend class Private;
374 template <class F>
376 friend Local<Primitive> Undefined(Isolate* isolate);
377 friend Local<Primitive> Null(Isolate* isolate);
378 friend Local<Boolean> True(Isolate* isolate);
379 friend Local<Boolean> False(Isolate* isolate);
380 friend class HandleScope;
383 template <class F1, class F2, class F3>
385 template <class F1, class F2>
387 template <class F>
388 friend class ReturnValue;
389 template <class F>
390 friend class Traced;
391 friend class internal::SamplingHeapProfiler;
393 friend class debug::ConsoleCallArguments;
394 friend class internal::LocalUnchecked<T>;
395
396 explicit Local(no_checking_tag do_not_check)
397 : LocalBase<T>(), StackAllocated(do_not_check) {}
398 explicit Local(const Local<T>& other, no_checking_tag do_not_check)
399 : LocalBase<T>(other), StackAllocated(do_not_check) {}
400
401 V8_INLINE explicit Local<T>(const LocalBase<T>& other)
402 : LocalBase<T>(other) {}
403
404 V8_INLINE static Local<T> FromSlot(internal::Address* slot) {
405 return Local<T>(LocalBase<T>::FromSlot(slot));
406 }
407
408#ifdef V8_ENABLE_DIRECT_LOCAL
409 friend class TypecheckWitness;
410
411 V8_INLINE static Local<T> FromAddress(internal::Address ptr) {
412 return Local<T>(LocalBase<T>(ptr));
413 }
414#endif // V8_ENABLE_DIRECT_LOCAL
415
416 V8_INLINE static Local<T> New(Isolate* isolate, internal::Address value) {
417 return Local<T>(LocalBase<T>::New(isolate, value));
418 }
419
420 V8_INLINE static Local<T> New(Isolate* isolate, T* that) {
421 return Local<T>(LocalBase<T>::New(isolate, that));
422 }
423
424 // Unsafe cast, should be avoided.
425 template <class S>
426 V8_INLINE Local<S> UnsafeAs() const {
427 return Local<S>(LocalBase<S>(*this));
428 }
429};
430
431namespace internal {
432// A local variant that is suitable for off-stack allocation.
433// Used internally by LocalVector<T>. Not to be used directly!
434template <typename T>
436 public:
437 LocalUnchecked() : Local<T>(Local<T>::do_not_check) {}
438
439#if defined(V8_ENABLE_LOCAL_OFF_STACK_CHECK) && V8_HAS_ATTRIBUTE_TRIVIAL_ABI
440 // In this case, the check is also enforced in the copy constructor and we
441 // need to suppress it.
442 LocalUnchecked(const LocalUnchecked& other)
443 : Local<T>(other, Local<T>::do_not_check) {}
444 LocalUnchecked& operator=(const LocalUnchecked&) = default;
445#endif
446
447 // Implicit conversion from Local.
448 LocalUnchecked(const Local<T>& other) // NOLINT(runtime/explicit)
449 : Local<T>(other, Local<T>::do_not_check) {}
450};
451
452#ifdef V8_ENABLE_DIRECT_LOCAL
453// Off-stack allocated direct locals must be registered as strong roots.
454// For off-stack indirect locals, this is not necessary.
455
456template <typename T>
457class StrongRootAllocator<LocalUnchecked<T>> : public StrongRootAllocatorBase {
458 public:
459 using value_type = LocalUnchecked<T>;
460 static_assert(std::is_standard_layout_v<value_type>);
461 static_assert(sizeof(value_type) == sizeof(Address));
462
463 explicit StrongRootAllocator(Heap* heap) : StrongRootAllocatorBase(heap) {}
464 explicit StrongRootAllocator(v8::Isolate* isolate)
465 : StrongRootAllocatorBase(isolate) {}
466 template <typename U>
467 StrongRootAllocator(const StrongRootAllocator<U>& other) noexcept
468 : StrongRootAllocatorBase(other) {}
469
470 value_type* allocate(size_t n) {
471 return reinterpret_cast<value_type*>(allocate_impl(n));
472 }
473 void deallocate(value_type* p, size_t n) noexcept {
474 return deallocate_impl(reinterpret_cast<Address*>(p), n);
475 }
476};
477#endif // V8_ENABLE_DIRECT_LOCAL
478} // namespace internal
479
480template <typename T>
482 private:
484
485#ifdef V8_ENABLE_DIRECT_LOCAL
486 using allocator_type = internal::StrongRootAllocator<element_type>;
487
488 static allocator_type make_allocator(Isolate* isolate) noexcept {
489 return allocator_type(isolate);
490 }
491#else
492 using allocator_type = std::allocator<element_type>;
493
494 static allocator_type make_allocator(Isolate* isolate) noexcept {
495 return allocator_type();
496 }
497#endif // V8_ENABLE_DIRECT_LOCAL
498
499 using vector_type = std::vector<element_type, allocator_type>;
500
501 public:
505 using size_type = size_t;
506 using difference_type = ptrdiff_t;
507 using iterator =
510 internal::WrappedIterator<typename vector_type::const_iterator,
511 const Local<T>>;
512
513 explicit LocalVector(Isolate* isolate) : backing_(make_allocator(isolate)) {}
514 LocalVector(Isolate* isolate, size_t n)
515 : backing_(n, make_allocator(isolate)) {}
516 explicit LocalVector(Isolate* isolate, std::initializer_list<Local<T>> init)
517 : backing_(make_allocator(isolate)) {
518 if (init.size() == 0) return;
519 backing_.reserve(init.size());
520 backing_.insert(backing_.end(), init.begin(), init.end());
521 }
522
523 iterator begin() noexcept { return iterator(backing_.begin()); }
524 const_iterator begin() const noexcept {
525 return const_iterator(backing_.begin());
526 }
527 iterator end() noexcept { return iterator(backing_.end()); }
528 const_iterator end() const noexcept { return const_iterator(backing_.end()); }
529
530 size_t size() const noexcept { return backing_.size(); }
531 bool empty() const noexcept { return backing_.empty(); }
532 void reserve(size_t n) { backing_.reserve(n); }
533 void shrink_to_fit() { backing_.shrink_to_fit(); }
534
535 Local<T>& operator[](size_t n) { return backing_[n]; }
536 const Local<T>& operator[](size_t n) const { return backing_[n]; }
537
538 Local<T>& at(size_t n) { return backing_.at(n); }
539 const Local<T>& at(size_t n) const { return backing_.at(n); }
540
541 Local<T>& front() { return backing_.front(); }
542 const Local<T>& front() const { return backing_.front(); }
543 Local<T>& back() { return backing_.back(); }
544 const Local<T>& back() const { return backing_.back(); }
545
546 Local<T>* data() noexcept { return backing_.data(); }
547 const Local<T>* data() const noexcept { return backing_.data(); }
548
550 return iterator(backing_.insert(pos.base(), value));
551 }
552
553 template <typename InputIt>
554 iterator insert(const_iterator pos, InputIt first, InputIt last) {
555 return iterator(backing_.insert(pos.base(), first, last));
556 }
557
558 iterator insert(const_iterator pos, std::initializer_list<Local<T>> init) {
559 return iterator(backing_.insert(pos.base(), init.begin(), init.end()));
560 }
561
562 LocalVector<T>& operator=(std::initializer_list<Local<T>> init) {
563 backing_.clear();
564 backing_.insert(backing_.end(), init.begin(), init.end());
565 return *this;
566 }
567
568 void push_back(const Local<T>& x) { backing_.push_back(x); }
569 void pop_back() { backing_.pop_back(); }
570 void emplace_back(const Local<T>& x) { backing_.emplace_back(x); }
571
572 void clear() noexcept { backing_.clear(); }
573 void resize(size_t n) { backing_.resize(n); }
574 void swap(LocalVector<T>& other) { backing_.swap(other.backing_); }
575
576 friend bool operator==(const LocalVector<T>& x, const LocalVector<T>& y) {
577 return x.backing_ == y.backing_;
578 }
579 friend bool operator!=(const LocalVector<T>& x, const LocalVector<T>& y) {
580 return x.backing_ != y.backing_;
581 }
582 friend bool operator<(const LocalVector<T>& x, const LocalVector<T>& y) {
583 return x.backing_ < y.backing_;
584 }
585 friend bool operator>(const LocalVector<T>& x, const LocalVector<T>& y) {
586 return x.backing_ > y.backing_;
587 }
588 friend bool operator<=(const LocalVector<T>& x, const LocalVector<T>& y) {
589 return x.backing_ <= y.backing_;
590 }
591 friend bool operator>=(const LocalVector<T>& x, const LocalVector<T>& y) {
592 return x.backing_ >= y.backing_;
593 }
594
595 private:
596 vector_type backing_;
597};
598
599#if !defined(V8_IMMINENT_DEPRECATION_WARNINGS)
600// Handle is an alias for Local for historical reasons.
601template <class T>
603#endif
604
615template <class T>
617 public:
618 V8_INLINE MaybeLocal() : local_() {}
619 template <class S>
620 V8_INLINE MaybeLocal(Local<S> that) : local_(that) {}
621
622 V8_INLINE bool IsEmpty() const { return local_.IsEmpty(); }
623
628 template <class S>
630 *out = local_;
631 return !IsEmpty();
632 }
633
640 return local_;
641 }
642
647 template <class S>
648 V8_INLINE Local<S> FromMaybe(Local<S> default_value) const {
649 return IsEmpty() ? default_value : Local<S>(local_);
650 }
651
657 template <class S>
659#ifdef V8_ENABLE_CHECKS
660 // If we're going to perform the type check then we have to check
661 // that the handle isn't empty before doing the checked cast.
662 if (that.IsEmpty()) return MaybeLocal<T>();
663 T::Cast(that.local_.template value<S>());
664#endif
665 return MaybeLocal<T>(that.local_);
666 }
667
673 template <class S>
675 return MaybeLocal<S>::Cast(*this);
676 }
677
678 private:
679 Local<T> local_;
680
681 template <typename S>
682 friend class MaybeLocal;
683};
684
690 public:
693
695 void operator=(const EscapableHandleScopeBase&) = delete;
696 void* operator new(size_t size) = delete;
697 void* operator new[](size_t size) = delete;
698 void operator delete(void*, size_t) = delete;
699 void operator delete[](void*, size_t) = delete;
700
701 protected:
707
708 private:
709 internal::Address* escape_slot_;
710};
711
713 : public EscapableHandleScopeBase {
714 public:
715 explicit EscapableHandleScope(Isolate* isolate)
716 : EscapableHandleScopeBase(isolate) {}
718 template <class T>
720#ifdef V8_ENABLE_DIRECT_LOCAL
721 return value;
722#else
723 if (value.IsEmpty()) return value;
724 return Local<T>::FromSlot(EscapeSlot(value.slot()));
725#endif
726 }
727
728 template <class T>
730 return Escape(value.FromMaybe(Local<T>()));
731 }
732};
733
740 public:
741 explicit SealHandleScope(Isolate* isolate);
743
745 void operator=(const SealHandleScope&) = delete;
746 void* operator new(size_t size) = delete;
747 void* operator new[](size_t size) = delete;
748 void operator delete(void*, size_t) = delete;
749 void operator delete[](void*, size_t) = delete;
750
751 private:
752 internal::Isolate* const i_isolate_;
753 internal::Address* prev_limit_;
754 int prev_sealed_level_;
755};
756
757} // namespace v8
758
759#endif // INCLUDE_V8_LOCAL_HANDLE_H_
EscapableHandleScopeBase(const EscapableHandleScopeBase &)=delete
internal::Address * EscapeSlot(internal::Address *escape_value)
EscapableHandleScopeBase(Isolate *isolate)
void operator=(const EscapableHandleScopeBase &)=delete
V8_INLINE ~EscapableHandleScopeBase()=default
V8_INLINE Local< T > Escape(Local< T > value)
EscapableHandleScope(Isolate *isolate)
V8_INLINE MaybeLocal< T > EscapeMaybe(MaybeLocal< T > value)
V8_INLINE ~EscapableHandleScope()=default
void Initialize(Isolate *isolate)
V8_INLINE HandleScope()=default
static int NumberOfHandles(Isolate *isolate)
V8_INLINE Isolate * GetIsolate() const
HandleScope(const HandleScope &)=delete
static internal::Address * CreateHandleForCurrentIsolate(internal::Address value)
HandleScope(Isolate *isolate)
void operator=(const HandleScope &)=delete
static internal::Address * CreateHandle(internal::Isolate *i_isolate, internal::Address value)
V8_INLINE LocalBase(internal::Address *location)
V8_INLINE LocalBase(const LocalBase< S > &other)
V8_INLINE LocalBase()=default
static V8_INLINE LocalBase< T > New(Isolate *isolate, T *that)
static V8_INLINE LocalBase< T > New(Isolate *isolate, internal::Address value)
static V8_INLINE LocalBase< T > FromSlot(internal::Address *slot)
friend class TracedReferenceBase
friend class Object
friend class PersistentValueMapBase
V8_INLINE T * operator->() const
V8_INLINE Local(Local< S > that)
V8_INLINE bool operator!=(const Local< S > &that) const
static V8_INLINE Local< T > New(Isolate *isolate, const PersistentBase< T > &that)
static V8_INLINE Local< T > Cast(Local< S > that)
V8_INLINE bool operator==(const Local< S > &that) const
friend class PropertyCallbackInfo
friend class ReturnValue
friend class HandleScope
friend class Traced
static V8_INLINE Local< T > New(Isolate *isolate, const BasicTracedReference< T > &that)
friend class FunctionCallbackInfo
V8_INLINE Local< S > As() const
friend class String
V8_INLINE bool operator==(const PersistentBase< S > &that) const
friend class MaybeLocal
friend class PersistentValueVector
friend class Isolate
friend class Utils
static V8_INLINE Local< T > New(Isolate *isolate, Local< T > that)
friend class Context
friend class Private
V8_INLINE T * operator*() const
V8_INLINE bool operator!=(const Persistent< S > &that) const
friend class Persistent
V8_INLINE Local()=default
friend class Global
friend class EscapableHandleScope
friend class Eternal
friend class InternalEscapableScope
friend class Local
void clear() noexcept
friend bool operator>=(const LocalVector< T > &x, const LocalVector< T > &y)
const_iterator begin() const noexcept
internal::WrappedIterator< typename vector_type::const_iterator, const Local< T > > const_iterator
friend bool operator<(const LocalVector< T > &x, const LocalVector< T > &y)
size_t size() const noexcept
friend bool operator<=(const LocalVector< T > &x, const LocalVector< T > &y)
bool empty() const noexcept
LocalVector(Isolate *isolate, std::initializer_list< Local< T > > init)
const Local< T > * data() const noexcept
friend bool operator!=(const LocalVector< T > &x, const LocalVector< T > &y)
iterator insert(const_iterator pos, std::initializer_list< Local< T > > init)
void resize(size_t n)
internal::WrappedIterator< typename vector_type::iterator, Local< T > > iterator
const_iterator end() const noexcept
LocalVector(Isolate *isolate, size_t n)
const Local< T > & back() const
Local< T > * data() noexcept
void swap(LocalVector< T > &other)
Local< T > & front()
LocalVector(Isolate *isolate)
iterator begin() noexcept
iterator insert(const_iterator pos, const Local< T > &value)
LocalVector< T > & operator=(std::initializer_list< Local< T > > init)
Local< T > & operator[](size_t n)
void emplace_back(const Local< T > &x)
const Local< T > & operator[](size_t n) const
iterator insert(const_iterator pos, InputIt first, InputIt last)
Local< T > & back()
friend bool operator==(const LocalVector< T > &x, const LocalVector< T > &y)
const Local< T > & front() const
void push_back(const Local< T > &x)
const Local< T > & at(size_t n) const
Local< T > & at(size_t n)
ptrdiff_t difference_type
void reserve(size_t n)
friend bool operator>(const LocalVector< T > &x, const LocalVector< T > &y)
iterator end() noexcept
V8_INLINE Local< T > ToLocalChecked()
V8_INLINE bool IsEmpty() const
V8_INLINE MaybeLocal(Local< S > that)
static V8_INLINE MaybeLocal< T > Cast(MaybeLocal< S > that)
V8_INLINE MaybeLocal()
V8_INLINE MaybeLocal< S > As() const
V8_INLINE Local< S > FromMaybe(Local< S > default_value) const
V8_WARN_UNUSED_RESULT V8_INLINE bool ToLocal(Local< S > *out) const
void operator=(const SealHandleScope &)=delete
SealHandleScope(Isolate *isolate)
SealHandleScope(const SealHandleScope &)=delete
V8_INLINE internal::Address ptr() const
V8_INLINE IndirectHandleBase()=default
V8_INLINE internal::Address *const & slot() const
LocalUnchecked(const Local< T > &other)
static V8_INLINE Address ValueAsAddress(const T *value)
static V8_INLINE bool IsEmpty(T *value)
constexpr Iterator base() const noexcept
internal::BasicPersistent< T, internal::StrongPersistentPolicy > Persistent
Definition persistent.h:363
V8_EXPORT void ToLocalEmpty()
uintptr_t Address
Definition v8-internal.h:31
V8_INLINE Local< Primitive > Null(Isolate *isolate)
V8_INLINE Local< Boolean > True(Isolate *isolate)
V8_INLINE Local< Boolean > False(Isolate *isolate)
V8_INLINE Local< Primitive > Undefined(Isolate *isolate)
#define V8_EXPORT
Definition v8config.h:753
#define V8_INLINE
Definition v8config.h:477
#define V8_WARN_UNUSED_RESULT
Definition v8config.h:628
#define V8_UNLIKELY(condition)
Definition v8config.h:617
#define V8_TRIVIAL_ABI
Definition v8config.h:703
#define V8_NODISCARD
Definition v8config.h:650