Yes, a closure's "context" (i.e. variables from its outer scope) is stored on the heap.
On Thu, Apr 4, 2019 at 8:37 AM <yangliang.158...@bytedance.com> wrote: > I have a problem about v8's closure. The problem is that when the > caller function finished, it's stack frame shall dismissed, then how could > the callee function get access to the caller's context if the stack is not > exist anymore ? Did we move those variable to the heap so that it could > still be find ? > > -- > -- > 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. > -- -- 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.