Skip to content

Commit

Permalink
bits of Bug 1135773 - Initialize QI return values to null in the cycl…
Browse files Browse the repository at this point in the history
…e collector. (rest was already part of 1119482
  • Loading branch information
rmottola committed Aug 8, 2019
1 parent 22d4578 commit 6f30ef1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xpcom/base/nsCycleCollector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ CCGraph::RemoveNodeFromMap(void* aPtr)
static nsISupports*
CanonicalizeXPCOMParticipant(nsISupports* aIn)
{
nsISupports* out;
nsISupports* out = nullptr;
aIn->QueryInterface(NS_GET_IID(nsCycleCollectionISupports),
reinterpret_cast<void**>(&out));
return out;
Expand Down Expand Up @@ -1423,6 +1423,7 @@ ToParticipant(nsISupports* aPtr, nsXPCOMCycleCollectionParticipant** aCp)
// nsXPCOMCycleCollectionParticipant, which is a per-class singleton helper
// object that implements traversal and unlinking logic for the nsISupports
// in question.
*aCp = nullptr;
CallQueryInterface(aPtr, aCp);
}

Expand Down

0 comments on commit 6f30ef1

Please sign in to comment.