You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've only written a few node addons, so I may be wrong, but shouldn't you be creating a HandleScope in any function that uses v8 classes? You export a few functions to JS land that do not contain one. Is this valid safe because of the HandleScope you create in the init function?
The text was updated successfully, but these errors were encountered:
Yo @ryancole - My understanding is that usage of HandleScopes can minimize the lifetime of allocated objects. Because in the two functions in question we're not allocating any handles which reference objects on the heap, and are just returning primitives, it's my belief that a HandleScope would be counter-productive.
Admittedly, this optimization is probably meaningless - I documented my understanding of why we don't need handlescopes in the couple functions in question in code.
I've only written a few node addons, so I may be wrong, but shouldn't you be creating a HandleScope in any function that uses v8 classes? You export a few functions to JS land that do not contain one. Is this valid safe because of the HandleScope you create in the init function?
The text was updated successfully, but these errors were encountered: