Bug 1247328 - Make PersistentRooted fully support Move semantics; r=sfink

--HG--
extra : rebase_source : fb4ccb31648f27b75c3088636a9cafd0934b6082
This commit is contained in:
Terrence Cole 2016-02-10 12:28:18 -08:00
parent b2b145c4bc
commit 537d4adc58

View File

@ -1048,9 +1048,10 @@ class PersistentRooted : public js::PersistentRootedBase<T>,
}
private:
void set(T value) {
template <typename U>
void set(U&& value) {
MOZ_ASSERT(initialized());
ptr = value;
ptr = mozilla::Forward<U>(value);
}
// See the comment above Rooted::ptr.