[MFBT] Make move assignment of RefPtr have the same behavior as nsCOMPtr

This commit is contained in:
Moonchild 2024-03-20 15:55:46 +01:00 committed by roytam1
commit e6e8224040

View file

@ -214,8 +214,7 @@ public:
RefPtr<T>&
operator=(RefPtr<T> && aRefPtr)
{
assign_assuming_AddRef(aRefPtr.mRawPtr);
aRefPtr.mRawPtr = nullptr;
assign_assuming_AddRef(aRefPtr.forget().take());
return *this;
}