If it was only a performance concern to always go through accessors, it is now also a functionality issue for profiling. The function name in cpu profile result shows up as "get <property name>" for the last property this accessor function is associated to.
I tried CreateDataProperty in place of ForceSet, but that doesn't do it. My function becomes undefined after the accessor is set to 0 and CreateDataProperty is called. Is that expected behavior? On Wednesday, October 7, 2015 at 12:52:08 AM UTC-7, Toon Verwaest wrote: > > We don't have such alternative right now (last time I checked). We're > still working out the best way to support that use case, which is important > to V8/DOM as well. One way would be to always go through the accessor, even > after lazy instantiation. I can imagine this to be too slow right now > though. > > Regards, > Toon > > On Tue, Oct 6, 2015, 21:57 Jakob Kummerow <[email protected] > <javascript:>> wrote: > >> Have you checked bit.ly/v8-api-changes ? >> >> On Tue, Oct 6, 2015 at 8:44 PM, Jane Chen <[email protected] >> <javascript:>> wrote: >> >>> In v8 4.7.0, Object.ForceSet is deprecated. What is the new recommended >>> way of bypassing accessors? >>> >>> The use case I have is that I lazily create global objects and functions >>> using accessors. Once it is created, I want to reset the accessor and >>> force save the created objects on Global. >>> >>> Thanks. >>> >>> -- >>> -- >>> v8-users mailing list >>> [email protected] <javascript:> >>> 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 [email protected] <javascript:>. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> -- >> v8-users mailing list >> [email protected] <javascript:> >> 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 [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- -- v8-users mailing list [email protected] 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
