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];
WeakCallbackInfo(Isolate *isolate, T *parameter, void *embedder_fields[kEmbedderFieldsInWeakCallback], Callback *callback)
V8_INLINE T * GetParameter() const
void SetSecondPassCallback(Callback callback) const
V8_INLINE Isolate * GetIsolate() const
void(*)(const WeakCallbackInfo< T > &data) Callback
V8_INLINE void * GetInternalField(int index) const
V8_EXPORT void InternalFieldOutOfBounds(int index)