On Tuesday, 27 February 2018 19:21:03 UTC-5, Ben Noordhuis wrote: > > On Tue, Feb 27, 2018 at 5:49 AM, A.M. <cis7...@gmail.com <javascript:>> > wrote: > > WeakCallbackType::kInternalFields creates a phantom handle (confusing, > I know) and those are dispatched in > GlobalHandles::PostGarbageCollectionProcessing(). > > IIRC, it's a two-pass system: first pass should reset the persistent > handle, second pass is the real finalizer. Preempting the question of > why it works that way: I don't know. :-) >
I have confirmed that the second callback behaves the same way and internal fields are still NULL pointers. I reset the global handle in the first callback and then after the script returned, I pumped the message loop and in the second callback internal fields are still NULL. So, the same two questions: 1. How can I get the two internal fields in the weak callbacks (first or second) set to the internal field values of the object for which this weak callback is being called? 2. In order to use second pass callbacks I need to pump the message loop. In a long-running script, am I supposed to do this within object callbacks? Thanks -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.