Skip to content

Custom RTTI, do not use V8 isolate by default

Compare
Choose a tag to compare
@pmed pmed released this 29 Oct 12:22
· 383 commits to master since this release

Custom type_info and type_id<T> are used in C++ class binder implementation. This allows to not force standard RTTI usage, which is turned off on many projects and in default Node.js addon configuration. Many thanks to @Manu343726 and @foonathan for their idea in https://github.com/Manu343726/ctti library.

A registery of bound classes is not stored in a V8 isolate by default from now. This is fine for typical use case, until we bind classes in multiple shared libraries (see #26). For the scenario with multiple shared libraries, define in all projects # V8PP_ISOLATE_DATA_SLOT with V8 slot number to store the classes registry there.

Fixed an issue with destroy of weak references to v8::External. They are used to store data with sizeof(data) > sizeof(void*), like lambda bindings (see #30).