On Fri, Aug 23, 2013 at 8:58 AM, Dan Carney <dcar...@chromium.org> wrote: > We've discussed the api a bit more, and decided that it really needs to look > more like Local and Persistent. I apologize to anyone who may have already > started to use the original api. This change will land next week and will > remove the original. > > The new api is used as follows: > > > Eternal<FunctionTemplate> eternal; > > .... > > Local<FunctionTemplate> function_template; > if (eternal.IsSet()) { > function_template = eternal.Get(isolate); > } else { > HandleScope scope(isolate); > function_template = BuildFunctionTemplate(); > eternal.Set(isolate, function_template); > }
Suggestion: lower the cognitive barrier, rename IsSet() to IsEmpty() - unless it does something completely different from Handle<T>::IsEmpty(), of course. -- -- 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/groups/opt_out.