mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1445584 - add a move assignment operator for nsCOMPtr; r=gerald
Somehow we didn't have this before. The lack thereof was causing us to do unnecessary things during event dispatch.
This commit is contained in:
parent
6b346fbdd8
commit
075adc9ec6
@ -619,6 +619,13 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
nsCOMPtr<T>& operator=(nsCOMPtr<T>&& aRhs)
|
||||
{
|
||||
assign_assuming_AddRef(aRhs.forget().take());
|
||||
NSCAP_ASSERT_NO_QUERY_NEEDED();
|
||||
return *this;
|
||||
}
|
||||
|
||||
nsCOMPtr<T>& operator=(T* aRhs)
|
||||
{
|
||||
assign_with_AddRef(aRhs);
|
||||
|
Loading…
Reference in New Issue
Block a user