forked from mirrors/gecko-dev
Bug 1517237 - Make move assignment of RefPtr to have the same behavior as nsCOMPtr's, r=froydnj
This commit is contained in:
parent
12ee1c0884
commit
827502c9a8
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue