Skip to content

Commit

Permalink
Bug 1517237 - Make move assignment of RefPtr to have the same behavio…
Browse files Browse the repository at this point in the history
…r as nsCOMPtr's, r=froydnj
  • Loading branch information
Olli Pettay authored and Olli Pettay committed Jan 2, 2019
1 parent 12ee1c0 commit 827502c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mfbt/RefPtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 827502c

Please sign in to comment.