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
247
257
273
274 private:
275 template <typename U>
277 friend class MacroAssembler;
281 using I = internal::Internals;
282
283 // ShouldThrowOnError() can return true only for setter/definer/deleter
284 // callbacks which match [[Set]]/[[DefineOwnProperty]]/[[Delete]]
285 // operations. We detect these operations by return value type - they
286 // all return boolean value, even though setter/deleter callbacks are
287 // still using v8::PropertyCallbackInfo<void>.
288 // TODO(https://crbug.com/348660658): cleanup this, once the callbacks are
289 // migrated to a new return type.
290 static constexpr bool HasShouldThrowOnError() {
291 return std::is_same_v<T, v8::Boolean> || std::is_same_v<T, void>;
292 }
293
294 // Indicates whether this is a named accessor/interceptor callback call
295 // or an indexed one.
296 V8_INLINE bool IsNamed() const;
297
298 // Frame block, matches the layout of ApiAccessorExitFrame.
299 // See ApiAccessorExitFrameConstants.
300 enum {
301 // Frame arguments block.
302 kPropertyKeyIndex,
303
304 // Regular ExitFrame structure.
305 kFrameSPIndex,
306 kFrameTypeIndex,
307 kFrameConstantPoolIndex, // Optional, see I::kFrameCPSlotCount.
308 kFrameFPIndex = kFrameConstantPoolIndex + I::kFrameCPSlotCount,
309 kFramePCIndex,
310
311 // Other arguments block, starts at kFirstArgumentIndex.
312 kFirstApiArgumentIndex,
313 kIsolateIndex = kFirstApiArgumentIndex,
314 kReturnValueIndex,
315 kCallbackInfoIndex,
316 kHolderIndex,
317
318 //
319 // Optional part, used only by setter/definer/deleter callbacks.
320 //
321 kFirstOptionalArgument,
322 kShouldThrowOnErrorIndex = kFirstOptionalArgument,
323
324 // Used as value handle storage when called via CallApiSetter builtin.
325 kValueIndex,
326
327 kFullArgsLength,
328 kMandatoryArgsLength = kFirstOptionalArgument,
329 kOptionalArgsLength = kFullArgsLength - kFirstOptionalArgument,
330
331 // Various lengths of just Api arguments part.
332 kMandatoryApiArgsLength = kMandatoryArgsLength - kFirstApiArgumentIndex,
333 kFullApiArgsLength = kFullArgsLength - kFirstApiArgumentIndex,
334 };
335
336 // PropertyCallbackInfo object provides a view of the stack area where the
337 // data is stored and thus it's not supposed to be copyable/movable.
339 PropertyCallbackInfo& operator=(const PropertyCallbackInfo&) = delete;
341 PropertyCallbackInfo& operator=(PropertyCallbackInfo&&) = delete;
342
343 PropertyCallbackInfo() = default;
344
345 // Declare as mutable to let GC modify the contents of the slots even though
346 // it's not possible to change values via this class.
347 // Define the array size as 1 to make it clear that we are going to access
348 // it out-of-bounds anyway.
349 mutable internal::Address args_[1];
350};
351
352using FunctionCallback = void (*)(const FunctionCallbackInfo<Value>& info);
353
354// --- Implementation ---
355
356template <typename T>
357ReturnValue<T>::ReturnValue(internal::Address* slot) : value_(slot) {}
358
359template <typename T>
360void ReturnValue<T>::SetInternal(internal::Address value) {
361#if V8_STATIC_ROOTS_BOOL
362 using I = internal::Internals;
363 // Ensure that the upper 32-bits are not modified. Compiler should be
364 // able to optimize this to a store of a lower 32-bits of the value.
365 // This is fine since the callback can return only JavaScript values which
366 // are either Smis or heap objects allocated in the main cage.
367 *value_ = I::DecompressTaggedField(*value_, I::CompressTagged(value));
368#else
369 *value_ = value;
370#endif // V8_STATIC_ROOTS_BOOL
371}
372
373template <typename T>
374template <typename S>
375void ReturnValue<T>::Set(const Global<S>& handle) {
376 static_assert(std::is_base_of_v<T, S>, "type check");
377 if (V8_UNLIKELY(handle.IsEmpty())) {
378 SetDefaultValue();
379 } else {
380 SetInternal(handle.ptr());
381 }
382}
383
384template <typename T>
385template <typename S>
387 static_assert(std::is_base_of_v<T, S>, "type check");
388#ifdef V8_ENABLE_CHECKS
389 internal::VerifyHandleIsNonEmpty(handle.IsEmpty());
390#endif // V8_ENABLE_CHECKS
391 SetInternal(handle.ptr());
392}
393
394template <typename T>
395template <typename S>
397 static_assert(std::is_base_of_v<T, S>, "type check");
398 if (V8_UNLIKELY(handle.IsEmpty())) {
399 SetDefaultValue();
400 } else {
401 SetInternal(handle.ptr());
402 }
403}
404
405template <typename T>
406template <typename S>
408 static_assert(std::is_base_of_v<T, S>, "type check");
409#ifdef V8_ENABLE_CHECKS
410 internal::VerifyHandleIsNonEmpty(handle.IsEmpty());
411#endif // V8_ENABLE_CHECKS
412 SetInternal(handle.ptr());
413}
414
415template <typename T>
416template <typename S>
417void ReturnValue<T>::Set(const Local<S> handle) {
418 static_assert(std::is_base_of_v<T, S>, "type check");
419 if (V8_UNLIKELY(handle.IsEmpty())) {
420 SetDefaultValue();
421 } else {
422 SetInternal(handle.ptr());
423 }
424}
425
426template <typename T>
427template <typename S>
429 static_assert(std::is_base_of_v<T, S>, "type check");
430#ifdef V8_ENABLE_CHECKS
431 internal::VerifyHandleIsNonEmpty(handle.IsEmpty());
432#endif // V8_ENABLE_CHECKS
433 SetInternal(handle.ptr());
434}
435
436template <typename T>
437void ReturnValue<T>::Set(double i) {
438 static_assert(std::is_base_of_v<T, Number>, "type check");
439 SetNonEmpty(Number::New(GetIsolate(), i));
440}
441
442template <typename T>
443void ReturnValue<T>::Set(int16_t i) {
444 static_assert(std::is_base_of_v<T, Integer>, "type check");
445 using I = internal::Internals;
446 static_assert(I::IsValidSmi(std::numeric_limits<int16_t>::min()));
447 static_assert(I::IsValidSmi(std::numeric_limits<int16_t>::max()));
448 SetInternal(I::IntegralToSmi(i));
449}
450
451template <typename T>
452void ReturnValue<T>::Set(int32_t i) {
453 static_assert(std::is_base_of_v<T, Integer>, "type check");
454 if (const auto result = internal::Internals::TryIntegralToSmi(i)) {
455 SetInternal(*result);
456 return;
457 }
458 SetNonEmpty(Integer::New(GetIsolate(), i));
459}
460
461template <typename T>
462void ReturnValue<T>::Set(int64_t i) {
463 static_assert(std::is_base_of_v<T, Integer>, "type check");
464 if (const auto result = internal::Internals::TryIntegralToSmi(i)) {
465 SetInternal(*result);
466 return;
467 }
468 SetNonEmpty(Number::New(GetIsolate(), static_cast<double>(i)));
469}
470
471template <typename T>
472void ReturnValue<T>::Set(uint16_t i) {
473 static_assert(std::is_base_of_v<T, Integer>, "type check");
474 using I = internal::Internals;
475 static_assert(I::IsValidSmi(std::numeric_limits<uint16_t>::min()));
476 static_assert(I::IsValidSmi(std::numeric_limits<uint16_t>::max()));
477 SetInternal(I::IntegralToSmi(i));
478}
479
480template <typename T>
481void ReturnValue<T>::Set(uint32_t i) {
482 static_assert(std::is_base_of_v<T, Integer>, "type check");
483 if (const auto result = internal::Internals::TryIntegralToSmi(i)) {
484 SetInternal(*result);
485 return;
486 }
487 SetNonEmpty(Integer::NewFromUnsigned(GetIsolate(), i));
488}
489
490template <typename T>
491void ReturnValue<T>::Set(uint64_t i) {
492 static_assert(std::is_base_of_v<T, Integer>, "type check");
493 if (const auto result = internal::Internals::TryIntegralToSmi(i)) {
494 SetInternal(*result);
495 return;
496 }
497 SetNonEmpty(Number::New(GetIsolate(), static_cast<double>(i)));
498}
499
500template <typename T>
501void ReturnValue<T>::Set(bool value) {
502 static_assert(std::is_void_v<T> || std::is_base_of_v<T, Boolean>,
503 "type check");
504 using I = internal::Internals;
505#if V8_STATIC_ROOTS_BOOL
506#ifdef V8_ENABLE_CHECKS
507 internal::PerformCastCheck(
508 internal::ValueHelper::SlotAsValue<Value, true>(value_));
509#endif // V8_ENABLE_CHECKS
510 SetInternal(value ? I::StaticReadOnlyRoot::kTrueValue
511 : I::StaticReadOnlyRoot::kFalseValue);
512#else
513 int root_index;
514 if (value) {
515 root_index = I::kTrueValueRootIndex;
516 } else {
517 root_index = I::kFalseValueRootIndex;
518 }
519 *value_ = I::GetRoot(GetIsolate(), root_index);
520#endif // V8_STATIC_ROOTS_BOOL
521}
522
523template <typename T>
525 using I = internal::Internals;
526 if constexpr (std::is_same_v<void, T> || std::is_same_v<v8::Boolean, T>) {
527 Set(true);
528 } else if constexpr (std::is_same_v<v8::Integer, T>) {
529 SetInternal(I::IntegralToSmi(0));
530 } else {
531 static_assert(std::is_same_v<v8::Value, T> || std::is_same_v<v8::Array, T>);
532#if V8_STATIC_ROOTS_BOOL
533 SetInternal(I::StaticReadOnlyRoot::kUndefinedValue);
534#else
535 *value_ = I::GetRoot(GetIsolate(), I::kUndefinedValueRootIndex);
536#endif // V8_STATIC_ROOTS_BOOL
537 }
538}
539
540template <typename T>
542 static_assert(std::is_base_of_v<T, Primitive>, "type check");
543 using I = internal::Internals;
544#if V8_STATIC_ROOTS_BOOL
545#ifdef V8_ENABLE_CHECKS
546 internal::PerformCastCheck(
547 internal::ValueHelper::SlotAsValue<Value, true>(value_));
548#endif // V8_ENABLE_CHECKS
549 SetInternal(I::StaticReadOnlyRoot::kNullValue);
550#else
551 *value_ = I::GetRoot(GetIsolate(), I::kNullValueRootIndex);
552#endif // V8_STATIC_ROOTS_BOOL
553}
554
555template <typename T>
557 static_assert(std::is_base_of_v<T, Primitive>, "type check");
558 using I = internal::Internals;
559#if V8_STATIC_ROOTS_BOOL
560#ifdef V8_ENABLE_CHECKS
561 internal::PerformCastCheck(
562 internal::ValueHelper::SlotAsValue<Value, true>(value_));
563#endif // V8_ENABLE_CHECKS
564 SetInternal(I::StaticReadOnlyRoot::kUndefinedValue);
565#else
566 *value_ = I::GetRoot(GetIsolate(), I::kUndefinedValueRootIndex);
567#endif // V8_STATIC_ROOTS_BOOL
568}
569
570template <typename T>
572 static_assert(std::is_void_v<T> || std::is_base_of_v<T, Boolean>,
573 "type check");
574 using I = internal::Internals;
575#if V8_STATIC_ROOTS_BOOL
576#ifdef V8_ENABLE_CHECKS
577 internal::PerformCastCheck(
578 internal::ValueHelper::SlotAsValue<Value, true>(value_));
579#endif // V8_ENABLE_CHECKS
580 SetInternal(I::StaticReadOnlyRoot::kFalseValue);
581#else
582 *value_ = I::GetRoot(GetIsolate(), I::kFalseValueRootIndex);
583#endif // V8_STATIC_ROOTS_BOOL
584}
585
586template <typename T>
588 static_assert(std::is_base_of_v<T, String>, "type check");
589 using I = internal::Internals;
590#if V8_STATIC_ROOTS_BOOL
591#ifdef V8_ENABLE_CHECKS
592 internal::PerformCastCheck(
593 internal::ValueHelper::SlotAsValue<Value, true>(value_));
594#endif // V8_ENABLE_CHECKS
595 SetInternal(I::StaticReadOnlyRoot::kEmptyString);
596#else
597 *value_ = I::GetRoot(GetIsolate(), I::kEmptyStringRootIndex);
598#endif // V8_STATIC_ROOTS_BOOL
599}
600
601template <typename T>
603 return *reinterpret_cast<Isolate**>(&value_[kIsolateValueIndex]);
604}
605
606template <typename T>
608 return Local<Value>::New(GetIsolate(),
609 internal::ValueHelper::SlotAsValue<Value>(value_));
610}
611
612template <typename T>
613template <typename S>
614void ReturnValue<T>::Set(S* whatever) {
615 static_assert(sizeof(S) < 0, "incompilable to prevent inadvertent misuse");
616}
617
618template <typename T>
620 if (i < 0 || Length() <= i) return Undefined(GetIsolate());
621 return Local<Value>::FromSlot(&values_[kFirstJSArgumentIndex + i]);
622}
623
624template <typename T>
626 return Local<Object>::FromSlot(&values_[kReceiverIndex]);
627}
628
629template <typename T>
631 if (IsConstructCall()) {
632 // Can't use &values_[kNewTargetIndex] because of "array index -1 is
633 // before the beginning of the array" error.
634 internal::Address* values = &values_[0];
635 return Local<Value>::FromSlot(values + kNewTargetIndex);
636 }
637 return Undefined(GetIsolate());
638}
639
640template <typename T>
642 auto target = Local<v8::Data>::FromSlot(&values_[kTargetIndex]);
643 return api_internal::GetFunctionTemplateData(GetIsolate(), target);
644}
645
646template <typename T>
648 return reinterpret_cast<Isolate*>(values_[kIsolateIndex]);
649}
650
651template <typename T>
653 return ReturnValue<T>(&values_[kReturnValueIndex]);
654}
655
656template <typename T>
658 return I::SmiValue(values_[kFrameTypeIndex]) == I::kFrameTypeApiConstructExit;
659}
660
661template <typename T>
663 return static_cast<int>(values_[kArgcIndex]);
664}
665
666template <typename T>
668 return I::SmiValue(args_[kFrameTypeIndex]) ==
669 I::kFrameTypeApiNamedAccessorExit;
670}
671
672template <typename T>
674 return *reinterpret_cast<Isolate**>(&args_[kIsolateIndex]);
675}
676
677template <typename T>
679 internal::Address callback_info = args_[kCallbackInfoIndex];
680 internal::Address data =
681 I::ReadTaggedPointerField(callback_info, I::kCallbackInfoDataOffset);
682 return Local<Value>::New(GetIsolate(), data);
683}
684
685template <typename T>
687 return Local<Object>::FromSlot(&args_[kHolderIndex]);
688}
689
690template <typename T>
692 return ReturnValue<T>(&args_[kReturnValueIndex]);
693}
694
695template <typename T>
697 if constexpr (!HasShouldThrowOnError()) return false;
698 if (args_[kShouldThrowOnErrorIndex] !=
699 I::IntegralToSmi(I::kInferShouldThrowMode)) {
700 return args_[kShouldThrowOnErrorIndex] != I::IntegralToSmi(I::kDontThrow);
701 }
703 reinterpret_cast<v8::internal::Isolate*>(GetIsolate()));
704}
705
706} // namespace v8
707
708#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:652
Local< Object > This() const
Definition: v8-function-callback.h:625
Local< Value > operator[](int i) const
Definition: v8-function-callback.h:619
Isolate * GetIsolate() const
Definition: v8-function-callback.h:647
Local< Value > NewTarget() const
Definition: v8-function-callback.h:630
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:641
bool IsConstructCall() const
Definition: v8-function-callback.h:657
int Length() const
Definition: v8-function-callback.h:662
Definition: v8-persistent-handle.h:349
Definition: v8-isolate.h:291
Definition: v8-local-handle.h:366
Definition: v8-util.h:166
Definition: v8-function-callback.h:224
Local< Value > Data() const
Definition: v8-function-callback.h:678
friend class internal::PropertyCallbackArguments
Definition: v8-function-callback.h:278
friend class PropertyCallbackInfo
Definition: v8-function-callback.h:276
bool ShouldThrowOnError() const
Definition: v8-function-callback.h:696
ReturnValue< T > GetReturnValue() const
Definition: v8-function-callback.h:691
Local< Object > HolderV2() const
Definition: v8-function-callback.h:686
friend class MacroAssembler
Definition: v8-function-callback.h:277
Isolate * GetIsolate() const
Definition: v8-function-callback.h:673
Definition: v8-function-callback.h:41
void SetFalse()
Definition: v8-function-callback.h:571
void SetEmptyString()
Definition: v8-function-callback.h:587
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:386
Local< Value > Get() const
Definition: v8-function-callback.h:607
void SetNull()
Definition: v8-function-callback.h:541
Isolate * GetIsolate() const
Definition: v8-function-callback.h:602
void SetUndefined()
Definition: v8-function-callback.h:556
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:920
static constexpr int kFrameCPSlotCount
Definition: v8-internal.h:1064
v8::Local< v8::Value > GetFunctionTemplateData(v8::Isolate *isolate, v8::Local< v8::Data > raw_target)
void PrintPropertyCallbackInfo(void *property_callback_info)
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:1018
void(*)(const FunctionCallbackInfo< Value > &info) FunctionCallback
Definition: v8-function-callback.h:352
#define V8_EXPORT
Definition: v8config.h:855
#define V8_INLINE
Definition: v8config.h:508
#define V8_UNLIKELY(condition)
Definition: v8config.h:668