diff options
Diffstat (limited to 'gin/public/wrapper_info.h')
-rw-r--r-- | gin/public/wrapper_info.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gin/public/wrapper_info.h b/gin/public/wrapper_info.h index f1c554e..fe047c0 100644 --- a/gin/public/wrapper_info.h +++ b/gin/public/wrapper_info.h @@ -5,10 +5,16 @@ #ifndef GIN_PUBLIC_WRAPPER_INFO_H_ #define GIN_PUBLIC_WRAPPER_INFO_H_ +#include "gin/public/gin_embedders.h" #include "v8/include/v8.h" namespace gin { +// Gin embedder that use their own WrapperInfo-like structs must ensure that +// the first field is of type GinEmbedderId and has the correct id set. They +// also should use kWrapperInfoIndex to start their WrapperInfo-like struct +// and ensure that all objects have kNumberOfInternalFields internal fields. + enum InternalFields { kWrapperInfoIndex, kEncodedValueIndex, @@ -17,7 +23,7 @@ enum InternalFields { struct WrapperInfo { static WrapperInfo* From(v8::Handle<v8::Object> object); - // Currently we just use the address of this struct for identity. + const GinEmbedder embedder; }; } // namespace gin |