Bug 162115: Make nsCOMArray return nsDeriviedSafes to avoid bad addrefs/releases
r=bz sr=alecf git-svn-id: svn://10.0.0.236/trunk@136593 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -76,7 +76,7 @@ nsCOMArray_base::InsertObjectsAt(const nsCOMArray_base& aObjects, PRInt32 aIndex
|
||||
// need to addref all these
|
||||
PRInt32 count = aObjects.Count();
|
||||
for (PRInt32 i = 0; i < count; ++i) {
|
||||
NS_IF_ADDREF(aObjects.ObjectAt(i));
|
||||
NS_IF_ADDREF(NS_STATIC_CAST(nsISupports*, aObjects.mArray[i]));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user