This type checks but I don't think it should RootedVarString r(...); HandleObject h = r; I think the solution is to remove this constructor and fix other things with explicit (restrict) casts. template <class T> template <class U> Handle<T>::Handle(const RootedVar<U> &); and the analogous one for Root<U>. Also, can we move Handle out of jsprvtd.h?
Created attachment 615047 [details] [diff] [review] patch Oops, this constructor was missing a testAssign, which is supposed to only allow handle assignments that follow normal C++ assignment rules for the wrapped type. See the other Handle constructors, which are also templated on a type other than the handle. Requiring casts whenever converting between handles of different but compatible types would be a mess I think, with all the subclassing we do for objects and strings.
Comment on attachment 615047 [details] [diff] [review] patch Ahh, I didn't see testAssign. Cool.