What I was confused about is that I'm not supposed to hold on to a ScriptOrigin. I'm supposed to get it from the UnboundScript associated with my Script.
I finally figured out what was going on. On Sun, Oct 2, 2016 at 12:57 AM, Ben Noordhuis <[email protected]> wrote: > On Sun, Oct 2, 2016 at 2:35 AM, Zac Hansen <[email protected]> wrote: > > My understanding is a v8::Local<T> is only valid within a handlescope, > so if > > you store one in an object, that object is then only valid within a > > handlescope, right? > > Correct. > > > For example, ScriptOrigin stores all its parameters as Local's: > > > > http://v8.paulfryzel.com/docs/master/include_2v8_8h_source.html#l01028 > > > > and then when I call for the ScriptID later, it's no longer valid and I > get > > a memory error. Am I missing something about v8::Local? or something > about > > how to use ScriptOrigin? Other types, like Script has a > > v8::Local<v8::UnboundScript>.. same question. > > You aren't missing anything, that is how Locals works. > > -- > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to a topic in the > Google Groups "v8-users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/v8-users/WyAoMwyKJ7w/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > 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.
