Hi,
I’m trying to update my embedding from 91ESR to 102ESR.
I’ve now compiled the library on windows and Linux and am starting to look at what has changed in the JS API as I am getting lots of errors when tryign to compile my code.
The first problem I have come across is that the JSCLASS_HAS_PRIVATE flag has been removed and JS::GetPrivate & JS::SetPrivate no longer exist.
I used this to store/get/set a private (void *) pointer for objects in my embedding. If this is no longer available what can I use instead?
Looking in Class.h I can see
// First reserved slot is PrivateValue(nsISupports*)
or UndefinedValue
.
static constexpr uint32_t JSCLASS_SLOT0_IS_NSISUPPORTS = 1 << 3
which looks like it could maybe be used to store a private value but I have no idea if this is correct, and if so, how to use it.
Can anyone point me in the right direction here? Is there an example anywhere that I could use to see how a private (void *) pointer can be stored for an object?
Apologies in advance. I suspect that this could be the first of several questions!
Is there any documentation anywhere describing what has changed between 91ESR and 102ESR in the JS API so I don’t ask stupid questions?
Many thanks
Miles