There are a couple of workarounds until all the changes to persistent are done:
- Simply use V8_USE_UNSAFE_HANDLES and make sure your map isn't itself being copied. - Do what we did in Blink with UnsafePersistent and DomWrapperMap<https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/bindings/v8/DOMWrapperMap.h&sq=package:chromium> - note that we will eventually get rid of UnsafePersistent in favour of the newly defined Persistent eventually, we want a copyable version of Persistent as well as something like a std::unique_ptr version for use in certain types of collections On Thursday, August 1, 2013 2:47:48 AM UTC+2, Michael Cullen wrote: > > Hi, > > I've been looking at weak persistent handles, and came across this blog > post (already referenced in a recent post here: > http://create.tpsitulsa.com/blog/2009/01/29/v8-objects/) > > With all the changes going on within Persistent, I was wondering what the > best way to store the weak handles is? std::map requires the object to be > copyable, which Persistent doesn't seem to be unless you > define V8_USE_UNSAFE_HANDLES. > > I did see a reference to the new Persistent being copyable and capable of > being stored in various datatypes - how will this work? > > Michael > -- -- 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/groups/opt_out.
