Closed ghost closed 7 years ago
Well, I was afraid this moment would come :-)
I use a data slot in V8 to store a pointer to a list of registered classes class_instances
. This list should be global, especially when we have several shared libraries which use v8pp.
Consider a first.dll
with a class Base
exposed to V8, and second.dll
with a class Derived
which is inherited from Base
. Both Base
and Derived
classes should be registered in the same class_instances
list.
I need to think either how to store class_instances
aside of V8 isolate data slot.
@h2so5 I've pushed changes as v1.2.0. Since this version v8pp doesn't use a data slot in v8::Isolate
. To register shared classes in several projects which use v8pp, a macro V8PP_ISOLATE_DATA_SLOT
should be defined in those projects.
@pmed Excellent! Thank you for your quick action 😺
There is no available v8::Isolate data slot in Electron. (All the slots are in use.)
https://github.com/electron/electron/blob/28e2058ff108a20dd395ebe5374403381b6d3ff2/atom/browser/node_debugger.cc#L23-L25