mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-06 00:31:27 +00:00
Bug 1247328 - Make PersistentRooted fully support Move semantics; r=sfink
--HG-- extra : rebase_source : fb4ccb31648f27b75c3088636a9cafd0934b6082
This commit is contained in:
parent
b2b145c4bc
commit
537d4adc58
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user