nan
nan copied to clipboard
Add convenience getter for Local from Persistent
This is found in newer versions of V8. Needs checking that no leaks were introduced.
Pretty big set of changes, I won't have time to review and am probably not the best for this one anyway, maybe @bnoordhuis or @agnat if they have time.
Missing docs though, is it just Get()
that we want to add or should more of this be officially documented, (like .persistent
?)
Just Get, the rest is private, so no point in documenting anything else, since it is not accessible. There were many changes, since I redid the newer implementation not to inherit from v8::PeristentBase<> but to compose it.
On October 12, 2015 2:05:26 PM GMT+03:00, Rod Vagg [email protected] wrote:
Pretty big set of changes, I won't have time to review and am probably not the best for this one anyway, maybe @bnoordhuis or @agnat if they have time.
Missing docs though, is it just
Get()
that we want to add or should more of this be officially documented, (like.persistent
?)
Reply to this email directly or view it on GitHub: https://github.com/nodejs/nan/pull/492#issuecomment-147366737
I wonder if we can simply add Get
to Nan::Persistent
and Nan::Global
instead? This would preserve Nan::PersistentBase
and its subclasses as subclasses of v8::PersistentBase
FWIW.
Yes, that would work, but I wanted to try and redo the implementation to make it more similar to the other one. Now the hierarchy is the same across versions, as would be expected.
On Monday 12 October 2015 04:36:52 Chris Brody wrote:
I wonder if we can simply add
Get
toNan::Persistent
andNan::Global
instead? This would preserveNan::PersistentBase
and its subclasses as subclasses ofv8::PersistentBase
FWIW.
Reply to this email directly or view it on GitHub: https://github.com/nodejs/nan/pull/492#issuecomment-147371189
Sounds reasonable to me. There is an assumption that the user would never need access to the v8::PersistentBase
object, hope this will remain true.
That assumption is already there for versions less than 0.12, this makes it explicit in newer versions too. v8::PersistentBase cannot even be directly instantiated.
On Monday 12 October 2015 04:50:21 Chris Brody wrote:
Sounds reasonable to me. There is an assumption that the user would never need access to the
v8::PersistentBase
object, hope this will remain true.
Reply to this email directly or view it on GitHub: https://github.com/nodejs/nan/pull/492#issuecomment-147373343