mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1157848 - Fix leak in OwningNonNull constructor from already_AddRefed; r=bz
This commit is contained in:
parent
38ec7986e5
commit
0263fdcfc2
@ -29,7 +29,7 @@ public:
|
||||
template<class U>
|
||||
MOZ_IMPLICIT OwningNonNull(already_AddRefed<U>&& aValue)
|
||||
{
|
||||
init(aValue.take());
|
||||
init(aValue);
|
||||
}
|
||||
|
||||
// This is no worse than get() in terms of const handling.
|
||||
@ -106,7 +106,7 @@ public:
|
||||
|
||||
protected:
|
||||
template<typename U>
|
||||
void init(U aValue)
|
||||
void init(U&& aValue)
|
||||
{
|
||||
mPtr = aValue;
|
||||
MOZ_ASSERT(mPtr);
|
||||
|
Loading…
Reference in New Issue
Block a user