Loading...
Searching...
No Matches
v8-function-callback.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_FUNCTION_CALLBACK_H_
6#define INCLUDE_V8_FUNCTION_CALLBACK_H_
7
8#include <cstdint>
9#include <limits>
10
11#include "v8-internal.h" // NOLINT(build/include_directory)
12#include "v8-local-handle.h" // NOLINT(build/include_directory)
13#include "v8-primitive.h" // NOLINT(build/include_directory)
14#include "v8config.h" // NOLINT(build/include_directory)
15
16namespace v8 {
17
18template <typename T>
19class BasicTracedReference;
20template <typename T>
21class Global;
22class Object;
23class Value;
24
25namespace internal {
26class FunctionCallbackArguments;
27class PropertyCallbackArguments;
28class Builtins;
29} // namespace internal
30
31namespace debug {
32class ConsoleCallArguments;
33} // namespace debug
34
35namespace api_internal {
37 v8::Isolate* isolate, v8::Local<v8::Data> raw_target);
38} // namespace api_internal
39
40template <typename T>
42 public:
43 template <class S>
44 V8_INLINE ReturnValue(const ReturnValue<S>& that) : value_(that.value_) {
45 static_assert(std::is_base_of_v<T, S>, "type check");
46 }
47 // Handle-based setters.
48 template <typename S>
49 V8_INLINE void Set(const Global<S>& handle);
50 template <typename S>
51 V8_INLINE void SetNonEmpty(const Global<S>& handle);
52 template <typename S>
53 V8_INLINE void Set(const BasicTracedReference<S>& handle);
54 template <typename S>
56 template <typename S>
57 V8_INLINE void Set(const Local<S> handle);
58 template <typename S>
59 V8_INLINE void SetNonEmpty(const Local<S> handle);
60
61 // Fast primitive number setters.
62 V8_INLINE void Set(bool value);
63 V8_INLINE void Set(double i);
64 V8_INLINE void Set(int16_t i);
65 V8_INLINE void Set(int32_t i);
66 V8_INLINE void Set(int64_t i);
67 V8_INLINE void Set(uint16_t i);
68 V8_INLINE void Set(uint32_t i);
69 V8_INLINE void Set(uint64_t i);
70
71 // Fast JS primitive setters.
72 V8_INLINE void SetNull();
74 V8_INLINE void SetFalse();
76
77 // Convenience getter for the Isolate.
79
80 // Pointer setter: Uncompilable to prevent inadvertent misuse.
81 template <typename S>
82 V8_INLINE void Set(S* whatever);
83
84 // Getter. Creates a new Local<> so it comes with a certain performance
85 // hit. If the ReturnValue was not yet set, this will return the undefined
86 // value.
88
89 private:
90 template <class F>
91 friend class ReturnValue;
92 template <class F>
94 template <class F>
96 template <class F, class G, class H>
98 V8_INLINE void SetInternal(internal::Address value);
99 // Default value depends on <T>:
100 // - <void> -> true_value,
101 // - <v8::Boolean> -> true_value,
102 // - <v8::Integer> -> 0,
103 // - <v8::Value> -> undefined_value,
104 // - <v8::Array> -> undefined_value.
105 V8_INLINE void SetDefaultValue();
107
108 // See FunctionCallbackInfo.
109 static constexpr int kIsolateValueIndex = -1;
110
111 internal::Address* value_;
112};
113
120template <typename T>
122 public:
124 V8_INLINE int Length() const;
129 V8_INLINE Local<Value> operator[](int i) const;
135 V8_INLINE bool IsConstructCall() const;
142
143 private:
148 using I = internal::Internals;
149
150 // Frame block, matches the layout of ApiCallbackExitFrame.
151 // See ApiCallbackExitFrameConstants.
152 enum {
153 //
154 // Optional frame arguments block (exists only for API_CONSTRUCT_EXIT
155 // frame).
156
157 // Frame arguments block.
158 kNewTargetIndex = -1,
159
160 //
161 // Mandatory part, exists for both API_CALLBACK_EXIT and API_CONSTRUCT_EXIT
162 // frames.
163 //
164
165 // Frame arguments block.
166 kArgcIndex,
167
168 // Regular ExitFrame structure.
169 kFrameSPIndex,
170 kFrameTypeIndex,
171 kFrameConstantPoolIndex, // Optional, see I::kFrameCPSlotCount.
172 kFrameFPIndex = kFrameConstantPoolIndex + I::kFrameCPSlotCount,
173 kFramePCIndex,
174
175 // Api arguments block, starts at kFirstArgumentIndex.
176 kFirstApiArgumentIndex,
177 kIsolateIndex = kFirstApiArgumentIndex,
178 kReturnValueIndex,
179 kContextIndex,
180 kTargetIndex,
181
182 // JS args block, starts at kFrameFirstImplicitArgsIndex.
183 kReceiverIndex,
184 kFirstJSArgumentIndex,
185
186 // Mandatory part includes receiver.
187 kArgsLength = kReceiverIndex + 1,
188 // Optional part size (exists only for API_CONSTRUCT_EXIT frame).
189 kOptionalArgsLength = 1,
190
191 // The length of just Api arguments part.
192 kApiArgsLength = kReceiverIndex - kFirstApiArgumentIndex,
193 };
194
195 static_assert(kArgcIndex == 0);
197 kIsolateIndex - kReturnValueIndex);
198
199 internal::Address* address_of_first_argument() const {
200 return &values_[kFirstJSArgumentIndex];
201 }
202
203 V8_INLINE FunctionCallbackInfo() = default;
204
205 // FunctionCallbackInfo object provides a view of the stack area where the
206 // data is stored and thus it's not supposed to be copyable/movable.
207 FunctionCallbackInfo(const FunctionCallbackInfo&) = delete;
208 FunctionCallbackInfo& operator=(const FunctionCallbackInfo&) = delete;
209 FunctionCallbackInfo(FunctionCallbackInfo&&) = delete;
210 FunctionCallbackInfo& operator=(FunctionCallbackInfo&&) = delete;
211
212 // Declare as mutable to let GC modify the contents of the slots even though
213 // it's not possible to change values via this class.
214 // Define the array size as 1 to make it clear that we are going to access
215 // it out-of-bounds from both sides anyway.
216 mutable internal::Address values_[1];
217};
218
223template <typename T>
225 public:
230
237
246 // TODO(http://crbug.com/333672197): deprecate and remove.
247 V8_DEPRECATE_SOON("Use Holder().")
249
259
275
276 private:
277 template <typename U>
279 friend class MacroAssembler;
280 friend class internal::PropertyCallbackArguments;
281 friend class internal::CustomArguments<PropertyCallbackInfo>;
282 friend void internal::PrintPropertyCallbackInfo(void*);
283 using I = internal::Internals;
284
285 // ShouldThrowOnError() can return true only for setter/definer/deleter
286 // callbacks which match [[Set]]/[[DefineOwnProperty]]/[[Delete]]
287 // operations. We detect these operations by return value type - they
288 // all return boolean value, even though setter/deleter callbacks are
289 // still using v8::PropertyCallbackInfo<void>.
290 // TODO(https://crbug.com/348660658): cleanup this, once the callbacks are
291 // migrated to a new return type.
292 static constexpr bool HasShouldThrowOnError() {
293 return std::is_same_v<T, v8::Boolean> || std::is_same_v<T, void>;
294 }
295
296 // Indicates whether this is a named accessor/interceptor callback call
297 // or an indexed one.
298 V8_INLINE bool IsNamed() const;
299
300 // Frame block, matches the layout of ApiAccessorExitFrame.
301 // See ApiAccessorExitFrameConstants.
302 enum {
303 // Frame arguments block.
304 kPropertyKeyIndex,
305
306 // Regular ExitFrame structure.
307 kFrameSPIndex,
308 kFrameTypeIndex,
309 kFrameConstantPoolIndex, // Optional, see I::kFrameCPSlotCount.
310 kFrameFPIndex = kFrameConstantPoolIndex + I::kFrameCPSlotCount,
311 kFramePCIndex,
312
313 // Other arguments block, starts at kFirstArgumentIndex.
314 kFirstApiArgumentIndex,
315 kIsolateIndex = kFirstApiArgumentIndex,
316 kReturnValueIndex,
317 kCallbackInfoIndex,
318 kHolderIndex,
319
320 //
321 // Optional part, used only by setter/definer/deleter callbacks.
322 //
323 kFirstOptionalArgument,
324 kShouldThrowOnErrorIndex = kFirstOptionalArgument,
325
326 // Used as value handle storage when called via CallApiSetter builtin.
327 kValueIndex,
328
329 kFullArgsLength,
330 kMandatoryArgsLength = kFirstOptionalArgument,
331 kOptionalArgsLength = kFullArgsLength - kFirstOptionalArgument,
332
333 // Various lengths of just Api arguments part.
334 kMandatoryApiArgsLength = kMandatoryArgsLength - kFirstApiArgumentIndex,
335 kFullApiArgsLength = kFullArgsLength - kFirstApiArgumentIndex,
336 };
337
338 // PropertyCallbackInfo object provides a view of the stack area where the
339 // data is stored and thus it's not supposed to be copyable/movable.
341 PropertyCallbackInfo& operator=(const PropertyCallbackInfo&) = delete;
343 PropertyCallbackInfo& operator=(PropertyCallbackInfo&&) = delete;
344
345 PropertyCallbackInfo() = default;
346
347 // Declare as mutable to let GC modify the contents of the slots even though
348 // it's not possible to change values via this class.
349 // Define the array size as 1 to make it clear that we are going to access
350 // it out-of-bounds anyway.
351 mutable internal::Address args_[1];
352};
353
354using FunctionCallback = void (*)(const FunctionCallbackInfo<Value>& info);
355
356// --- Implementation ---
357
358template <typename T>
359ReturnValue<T>::ReturnValue(internal::Address* slot) : value_(slot) {}
360
361template <typename T>
362void ReturnValue<T>::SetInternal(internal::Address value) {
363#if V8_STATIC_ROOTS_BOOL
364 using I = internal::Internals;
365 // Ensure that the upper 32-bits are not modified. Compiler should be
366 // able to optimize this to a store of a lower 32-bits of the value.
367 // This is fine since the callback can return only JavaScript values which
368 // are either Smis or heap objects allocated in the main cage.
369 *value_ = I::DecompressTaggedField(*value_, I::CompressTagged(value));
370#else
371 *value_ = value;
372#endif // V8_STATIC_ROOTS_BOOL
373}
374
375template <typename T>
376template <typename S>
377void ReturnValue<T>::Set(const Global<S>& handle) {
378 static_assert(std::is_base_of_v<T, S>, "type check");
379 if (V8_UNLIKELY(handle.IsEmpty())) {
380 SetDefaultValue();
381 } else {
382 SetInternal(handle.ptr());
383 }
384}
385
386template <typename T>
387template <typename S>
389 static_assert(std::is_base_of_v<T, S>, "type check");
390#ifdef V8_ENABLE_CHECKS
391 internal::VerifyHandleIsNonEmpty(handle.IsEmpty());
392#endif // V8_ENABLE_CHECKS
393 SetInternal(handle.ptr());
394}
395
396template <typename T>
397template <typename S>
399 static_assert(std::is_base_of_v<T, S>, "type check");
400 if (V8_UNLIKELY(handle.IsEmpty())) {
401 SetDefaultValue();
402 } else {
403 SetInternal(handle.ptr());
404 }
405}
406
407template <typename T>
408template <typename S>
410 static_assert(std::is_base_of_v<T, S>, "type check");
411#ifdef V8_ENABLE_CHECKS
412 internal::VerifyHandleIsNonEmpty(handle.IsEmpty());
413#endif // V8_ENABLE_CHECKS
414 SetInternal(handle.ptr());
415}
416
417template <typename T>
418template <typename S>
419void ReturnValue<T>::Set(const Local<S> handle) {
420 static_assert(std::is_base_of_v<T, S>, "type check");
421 if (V8_UNLIKELY(handle.IsEmpty())) {
422 SetDefaultValue();
423 } else {
424 SetInternal(handle.ptr());
425 }
426}
427
428template <typename T>
429template <typename S>
431 static_assert(std::is_base_of_v<T, S>, "type check");
432#ifdef V8_ENABLE_CHECKS
433 internal::VerifyHandleIsNonEmpty(handle.IsEmpty());
434#endif // V8_ENABLE_CHECKS
435 SetInternal(handle.ptr());
436}
437
438template <typename T>
439void ReturnValue<T>::Set(double i) {
440 static_assert(std::is_base_of_v<T, Number>, "type check");
441 SetNonEmpty(Number::New(GetIsolate(), i));
442}
443
444template <typename T>
445void ReturnValue<T>::Set(int16_t i) {
446 static_assert(std::is_base_of_v<T, Integer>, "type check");
447 using I = internal::Internals;
448 static_assert(I::IsValidSmi(std::numeric_limits<int16_t>::min()));
449 static_assert(I::IsValidSmi(std::numeric_limits<int16_t>::max()));
450 SetInternal(I::IntegralToSmi(i));
451}
452
453template <typename T>
454void ReturnValue<T>::Set(int32_t i) {
455 static_assert(std::is_base_of_v<T, Integer>, "type check");
456 if (const auto result = internal::Internals::TryIntegralToSmi(i)) {
457 SetInternal(*result);
458 return;
459 }
460 SetNonEmpty(Integer::New(GetIsolate(), i));
461}
462
463template <typename T>
464void ReturnValue<T>::Set(int64_t i) {
465 static_assert(std::is_base_of_v<T, Integer>, "type check");
466 if (const auto result = internal::Internals::TryIntegralToSmi(i)) {
467 SetInternal(*result);
468 return;
469 }
470 SetNonEmpty(Number::New(GetIsolate(), static_cast<double>(i)));
471}
472
473template <typename T>
474void ReturnValue<T>::Set(uint16_t i) {
475 static_assert(std::is_base_of_v<T, Integer>, "type check");
476 using I = internal::Internals;
477 static_assert(I::IsValidSmi(std::numeric_limits<uint16_t>::min()));
478 static_assert(I::IsValidSmi(std::numeric_limits<uint16_t>::max()));
479 SetInternal(I::IntegralToSmi(i));
480}
481
482template <typename T>
483void ReturnValue<T>::Set(uint32_t i) {
484 static_assert(std::is_base_of_v<T, Integer>, "type check");
485 if (const auto result = internal::Internals::TryIntegralToSmi(i)) {
486 SetInternal(*result);
487 return;
488 }
489 SetNonEmpty(Integer::NewFromUnsigned(GetIsolate(), i));
490}
491
492template <typename T>
493void ReturnValue<T>::Set(uint64_t i) {
494 static_assert(std::is_base_of_v<T, Integer>, "type check");
495 if (const auto result = internal::Internals::TryIntegralToSmi(i)) {
496 SetInternal(*result);
497 return;
498 }
499 SetNonEmpty(Number::New(GetIsolate(), static_cast<double>(i)));
500}
501
502template <typename T>
503void ReturnValue<T>::Set(bool value) {
504 static_assert(std::is_void_v<T> || std::is_base_of_v<T, Boolean>,
505 "type check");
506 using I = internal::Internals;
507#if V8_STATIC_ROOTS_BOOL
508#ifdef V8_ENABLE_CHECKS
509 internal::PerformCastCheck(
510 internal::ValueHelper::SlotAsValue<Value, true>(value_));
511#endif // V8_ENABLE_CHECKS
512 SetInternal(value ? I::StaticReadOnlyRoot::kTrueValue
513 : I::StaticReadOnlyRoot::kFalseValue);
514#else
515 int root_index;
516 if (value) {
517 root_index = I::kTrueValueRootIndex;
518 } else {
519 root_index = I::kFalseValueRootIndex;
520 }
521 *value_ = I::GetRoot(GetIsolate(), root_index);
522#endif // V8_STATIC_ROOTS_BOOL
523}
524
525template <typename T>
527 using I = internal::Internals;
528 if constexpr (std::is_same_v<void, T> || std::is_same_v<v8::Boolean, T>) {
529 Set(true);
530 } else if constexpr (std::is_same_v<v8::Integer, T>) {
531 SetInternal(I::IntegralToSmi(0));
532 } else {
533 static_assert(std::is_same_v<v8::Value, T> || std::is_same_v<v8::Array, T>);
534#if V8_STATIC_ROOTS_BOOL
535 SetInternal(I::StaticReadOnlyRoot::kUndefinedValue);
536#else
537 *value_ = I::GetRoot(GetIsolate(), I::kUndefinedValueRootIndex);
538#endif // V8_STATIC_ROOTS_BOOL
539 }
540}
541
542template <typename T>
544 static_assert(std::is_base_of_v<T, Primitive>, "type check");
545 using I = internal::Internals;
546#if V8_STATIC_ROOTS_BOOL
547#ifdef V8_ENABLE_CHECKS
548 internal::PerformCastCheck(
549 internal::ValueHelper::SlotAsValue<Value, true>(value_));
550#endif // V8_ENABLE_CHECKS
551 SetInternal(I::StaticReadOnlyRoot::kNullValue);
552#else
553 *value_ = I::GetRoot(GetIsolate(), I::kNullValueRootIndex);
554#endif // V8_STATIC_ROOTS_BOOL
555}
556
557template <typename T>
559 static_assert(std::is_base_of_v<T, Primitive>, "type check");
560 using I = internal::Internals;
561#if V8_STATIC_ROOTS_BOOL
562#ifdef V8_ENABLE_CHECKS
563 internal::PerformCastCheck(
564 internal::ValueHelper::SlotAsValue<Value, true>(value_));
565#endif // V8_ENABLE_CHECKS
566 SetInternal(I::StaticReadOnlyRoot::kUndefinedValue);
567#else
568 *value_ = I::GetRoot(GetIsolate(), I::kUndefinedValueRootIndex);
569#endif // V8_STATIC_ROOTS_BOOL
570}
571
572template <typename T>
574 static_assert(std::is_void_v<T> || std::is_base_of_v<T, Boolean>,
575 "type check");
576 using I = internal::Internals;
577#if V8_STATIC_ROOTS_BOOL
578#ifdef V8_ENABLE_CHECKS
579 internal::PerformCastCheck(
580 internal::ValueHelper::SlotAsValue<Value, true>(value_));
581#endif // V8_ENABLE_CHECKS
582 SetInternal(I::StaticReadOnlyRoot::kFalseValue);
583#else
584 *value_ = I::GetRoot(GetIsolate(), I::kFalseValueRootIndex);
585#endif // V8_STATIC_ROOTS_BOOL
586}
587
588template <typename T>
590 static_assert(std::is_base_of_v<T, String>, "type check");
591 using I = internal::Internals;
592#if V8_STATIC_ROOTS_BOOL
593#ifdef V8_ENABLE_CHECKS
594 internal::PerformCastCheck(
595 internal::ValueHelper::SlotAsValue<Value, true>(value_));
596#endif // V8_ENABLE_CHECKS
597 SetInternal(I::StaticReadOnlyRoot::kEmptyString);
598#else
599 *value_ = I::GetRoot(GetIsolate(), I::kEmptyStringRootIndex);
600#endif // V8_STATIC_ROOTS_BOOL
601}
602
603template <typename T>
605 return *reinterpret_cast<Isolate**>(&value_[kIsolateValueIndex]);
606}
607
608template <typename T>
610 return Local<Value>::New(GetIsolate(),
611 internal::ValueHelper::SlotAsValue<Value>(value_));
612}
613
614template <typename T>
615template <typename S>
616void ReturnValue<T>::Set(S* whatever) {
617 static_assert(sizeof(S) < 0, "incompilable to prevent inadvertent misuse");
618}
619
620template <typename T>
622 if (i < 0 || Length() <= i) return Undefined(GetIsolate());
623 return Local<Value>::FromSlot(&values_[kFirstJSArgumentIndex + i]);
624}
625
626template <typename T>
628 return Local<Object>::FromSlot(&values_[kReceiverIndex]);
629}
630
631template <typename T>
633 if (IsConstructCall()) {
634 // Can't use &values_[kNewTargetIndex] because of "array index -1 is
635 // before the beginning of the array" error.
636 internal::Address* values = &values_[0];
637 return Local<Value>::FromSlot(values + kNewTargetIndex);
638 }
639 return Undefined(GetIsolate());
640}
641
642template <typename T>
644 auto target = Local<v8::Data>::FromSlot(&values_[kTargetIndex]);
645 return api_internal::GetFunctionTemplateData(GetIsolate(), target);
646}
647
648template <typename T>
650 return reinterpret_cast<Isolate*>(values_[kIsolateIndex]);
651}
652
653template <typename T>
655 return ReturnValue<T>(&values_[kReturnValueIndex]);
656}
657
658template <typename T>
660 return I::SmiValue(values_[kFrameTypeIndex]) == I::kFrameTypeApiConstructExit;
661}
662
663template <typename T>
665 return static_cast<int>(values_[kArgcIndex]);
666}
667
668template <typename T>
670 return I::SmiValue(args_[kFrameTypeIndex]) ==
671 I::kFrameTypeApiNamedAccessorExit;
672}
673
674template <typename T>
676 return *reinterpret_cast<Isolate**>(&args_[kIsolateIndex]);
677}
678
679template <typename T>
681 internal::Address callback_info = args_[kCallbackInfoIndex];
682 internal::Address data =
683 I::ReadTaggedPointerField(callback_info, I::kCallbackInfoDataOffset);
684 return Local<Value>::New(GetIsolate(), data);
685}
686
687template <typename T>
689 return Local<Object>::FromSlot(&args_[kHolderIndex]);
690}
691template <typename T>
693 return Holder();
694}
695
696template <typename T>
698 return ReturnValue<T>(&args_[kReturnValueIndex]);
699}
700
701template <typename T>
703 if constexpr (!HasShouldThrowOnError()) return false;
704 if (args_[kShouldThrowOnErrorIndex] !=
705 I::IntegralToSmi(I::kInferShouldThrowMode)) {
706 return args_[kShouldThrowOnErrorIndex] != I::IntegralToSmi(I::kDontThrow);
707 }
709 reinterpret_cast<v8::internal::Isolate*>(GetIsolate()));
710}
711
712} // namespace v8
713
714#endif // INCLUDE_V8_FUNCTION_CALLBACK_H_
Definition: v8-traced-handle.h:124
Definition: v8-function-callback.h:121
ReturnValue< T > GetReturnValue() const
Definition: v8-function-callback.h:654
Local< Object > This() const
Definition: v8-function-callback.h:627
Local< Value > operator[](int i) const
Definition: v8-function-callback.h:621
Isolate * GetIsolate() const
Definition: v8-function-callback.h:649
Local< Value > NewTarget() const
Definition: v8-function-callback.h:632
friend class debug::ConsoleCallArguments
Definition: v8-function-callback.h:146
friend class internal::FunctionCallbackArguments
Definition: v8-function-callback.h:144
Local< Value > Data() const
Definition: v8-function-callback.h:643
bool IsConstructCall() const
Definition: v8-function-callback.h:659
int Length() const
Definition: v8-function-callback.h:664
Definition: v8-persistent-handle.h:349
Definition: v8-isolate.h:291
Definition: v8-local-handle.h:366
Definition: v8-object.h:262
Definition: v8-util.h:166
Definition: v8-function-callback.h:224
Local< Value > Data() const
Definition: v8-function-callback.h:680
friend class internal::PropertyCallbackArguments
Definition: v8-function-callback.h:280
friend class PropertyCallbackInfo
Definition: v8-function-callback.h:278
Local< Object > Holder() const
Definition: v8-function-callback.h:688
bool ShouldThrowOnError() const
Definition: v8-function-callback.h:702
ReturnValue< T > GetReturnValue() const
Definition: v8-function-callback.h:697
Local< Object > HolderV2() const
Definition: v8-function-callback.h:692
friend void internal::PrintPropertyCallbackInfo(void *)
friend class MacroAssembler
Definition: v8-function-callback.h:279
Isolate * GetIsolate() const
Definition: v8-function-callback.h:675
Definition: v8-function-callback.h:41
void SetFalse()
Definition: v8-function-callback.h:573
void SetEmptyString()
Definition: v8-function-callback.h:589
friend class ReturnValue
Definition: v8-function-callback.h:91
ReturnValue(const ReturnValue< S > &that)
Definition: v8-function-callback.h:44
void SetNonEmpty(const Global< S > &handle)
Definition: v8-function-callback.h:388
Local< Value > Get() const
Definition: v8-function-callback.h:609
void SetNull()
Definition: v8-function-callback.h:543
Isolate * GetIsolate() const
Definition: v8-function-callback.h:604
void SetUndefined()
Definition: v8-function-callback.h:558
Definition: v8-container.h:148
internal::Address ptr() const
Definition: v8-handle-base.h:80
bool IsEmpty() const
Definition: v8-handle-base.h:60
Definition: v8-local-handle.h:75
Definition: v8-internal.h:934
static constexpr int kFrameCPSlotCount
Definition: v8-internal.h:1074
v8::Local< v8::Value > GetFunctionTemplateData(v8::Isolate *isolate, v8::Local< v8::Data > raw_target)
bool ShouldThrowOnError(internal::Isolate *isolate)
uintptr_t Address
Definition: v8-internal.h:38
void PrintFunctionCallbackInfo(void *function_callback_info)
Definition: libplatform.h:15
Local< Primitive > Undefined(Isolate *isolate)
Definition: v8-primitive.h:1024
void(*)(const FunctionCallbackInfo< Value > &info) FunctionCallback
Definition: v8-function-callback.h:354
#define V8_EXPORT
Definition: v8config.h:854
#define V8_INLINE
Definition: v8config.h:508
#define V8_DEPRECATE_SOON(message)
Definition: v8config.h:621
#define V8_UNLIKELY(condition)
Definition: v8config.h:667