Actually, you can still use Global with SetWeak, so we can just switch to that, but is there any harm in changing it anyway? If there's no downside it would be good to switch it to avoid others running into the same issue over and over.
On Tuesday, 10 December 2019 11:28:35 UTC-5, [email protected] wrote: > > Is there any reason why NonCopyablePersistentTrait's kResetInDestructor > is still set to false? Can it be updated to true? > > The comments seem to indicate that it would be switched at some time in > the future (written 6 years ago). > > And ~Persistent has a comment that the flag should always be true. > > This primarily affects use cases which involve setting the Persistent to > weak, as otherwise you can use Global which does reset in its destructor. > There if you have a class which holds a Persistent as a member, you end > up with corruption unless you remember to explicitly call Reset in your > own destructor. > > Thanks, > Daryl. > -- -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/b487b503-f1bf-4ad3-abda-8fde91db3cfd%40googlegroups.com.
