Re: [v8-users] Check failed: Handle not reset in first callback. How to Reset my Persistent

2018-10-09 Thread J Decker
On Tue, Oct 9, 2018 at 4:40 PM Mike Moening wrote: > The example was helpful. Encapsulating the Persistent in the callacks > private data object seems to be the way to roll. > > >> // kParameter will pass a void* parameter back to the callback, >> kInternalFields >> // will pass the first two

Re: [v8-users] Check failed: Handle not reset in first callback. How to Reset my Persistent

2018-10-09 Thread Mike Moening
The example was helpful. Encapsulating the Persistent in the callacks private data object seems to be the way to roll. > // kParameter will pass a void* parameter back to the callback, > kInternalFields > // will pass the first two internal fields back to the callback, kFinalizer > // will

Re: [v8-users] Check failed: Handle not reset in first callback. How to Reset my Persistent

2018-10-09 Thread Jakob Kummerow
On Tue, Oct 9, 2018 at 11:45 AM Mike Moening wrote: > With recent versions of v8 the SetWeak method has changed and the > Persistent* parameter has been dropped from the destructor callback. > The destructor callback function is **supposed** to Reset() the persistent > or its a leak. > If you

[v8-users] Check failed: Handle not reset in first callback. How to Reset my Persistent

2018-10-09 Thread Mike Moening
With recent versions of v8 the SetWeak method has changed and the Persistent* parameter has been dropped from the destructor callback. The destructor callback function is **supposed** to Reset() the persistent or its a leak. If you don't V8 crashes and tells you this: Check failed: Handle not