mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Move AddRef to before the unlock. (Bug 650674, patch 2) r=bsmedberg
This commit is contained in:
parent
568b1c07ba
commit
31639e67d3
@ -475,6 +475,9 @@ nsProxyObject::LockedFind(REFNSIID aIID, void **aResult)
|
||||
// linked-list check.
|
||||
for (peo = mFirst; peo; peo = peo->mNext) {
|
||||
if (peo->GetClass()->GetProxiedIID().Equals(aIID)) {
|
||||
// Best to AddRef for our caller before unlocking.
|
||||
peo->LockedAddRef();
|
||||
|
||||
{
|
||||
// Deleting an nsProxyEventObject can call Release on an
|
||||
// nsProxyObject, which can only happen when not holding
|
||||
@ -483,7 +486,6 @@ nsProxyObject::LockedFind(REFNSIID aIID, void **aResult)
|
||||
delete newpeo;
|
||||
}
|
||||
*aResult = static_cast<nsISupports*>(peo->mXPTCStub);
|
||||
peo->LockedAddRef();
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user