[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>& RefPtr<T>&
operator=(RefPtr<T> && aRefPtr) operator=(RefPtr<T> && aRefPtr)
{ {
assign_assuming_AddRef(aRefPtr.mRawPtr); assign_assuming_AddRef(aRefPtr.forget().take());
aRefPtr.mRawPtr = nullptr;
return *this; return *this;
} }