I had some additional thoughts on this:
it might be better to have GlobalHandles::Node keep the pointer to the
persistent, so on move and copy it's easy to relocate automatically, then
WeakDispose could just return a bool instead and we could optimize for the
case
of always returning true or always returning false. Also, the weak callback
could always return the pointer to the original persistent, which would be
ideal, since the caller could just Reset it properly from there. I would
still
pass the Handle on the stack as well since it should be cheap and allows us
not
to deal with new handles in callbacks in the common case.
https://chromiumcodereview.appspot.com/17443004/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.