Bug 1517237 - Make move assignment of RefPtr to have the same behavior as nsCOMPtr's, r=froydnj

This commit is contained in:
Olli Pettay 2019-01-02 21:44:32 +02:00
parent 12ee1c0884
commit 827502c9a8

View file

@ -201,8 +201,7 @@ class MOZ_IS_REFPTR RefPtr {
#endif // defined(XP_WIN)
RefPtr<T>& operator=(RefPtr<T>&& aRefPtr) {
assign_assuming_AddRef(aRefPtr.mRawPtr);
aRefPtr.mRawPtr = nullptr;
assign_assuming_AddRef(aRefPtr.forget().take());
return *this;
}