5#ifndef INCLUDE_V8_WEAK_CALLBACK_INFO_H_
6#define INCLUDE_V8_WEAK_CALLBACK_INFO_H_
14namespace api_internal {
18static const int kInternalFieldsInWeakCallback = 2;
19static const int kEmbedderFieldsInWeakCallback = 2;
27 void* embedder_fields[kEmbedderFieldsInWeakCallback],
29 : isolate_(isolate), parameter_(parameter), callback_(callback) {
30 for (
int i = 0; i < kEmbedderFieldsInWeakCallback; ++i) {
31 embedder_fields_[i] = embedder_fields[i];
51 void* embedder_fields_[kEmbedderFieldsInWeakCallback];
70#ifdef V8_ENABLE_CHECKS
71 if (index < 0 || index >= kEmbedderFieldsInWeakCallback) {
75 return embedder_fields_[index];
Definition: v8-isolate.h:261
Definition: v8-weak-callback-info.h:22
void * GetInternalField(int index) const
Definition: v8-weak-callback-info.h:69
Isolate * GetIsolate() const
Definition: v8-weak-callback-info.h:35
void(*)(const WeakCallbackInfo< T > &data) Callback
Definition: v8-weak-callback-info.h:24
T * GetParameter() const
Definition: v8-weak-callback-info.h:36
WeakCallbackInfo(Isolate *isolate, T *parameter, void *embedder_fields[kEmbedderFieldsInWeakCallback], Callback *callback)
Definition: v8-weak-callback-info.h:26
void SetSecondPassCallback(Callback callback) const
Definition: v8-weak-callback-info.h:45
void InternalFieldOutOfBounds(int index)
Definition: libplatform.h:15
WeakCallbackType
Definition: v8-weak-callback-info.h:57
#define V8_EXPORT
Definition: v8config.h:793
#define V8_INLINE
Definition: v8config.h:499