Let's make this take &JS<T> instead, and then we don't have to add so many clone calls.