nsCOMArray_base copy constructor should not assert. Bug 178534,

r=dougt, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@133068 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2002-11-06 02:00:50 +00:00
parent ed88abf015
commit 6f34f01f3d

View File

@@ -47,15 +47,9 @@ PR_STATIC_CALLBACK(PRBool) ReleaseObjects(void* aElement, void*);
// object gets another AddRef()
nsCOMArray_base::nsCOMArray_base(const nsCOMArray_base& aOther)
{
PRInt32 count = aOther.Count();
// make sure we do only one allocation
mArray.SizeTo(count);
PRInt32 i;
for (i=0; i<count; i++) {
// ReplaceObjectAt will handle existing null entries for us
ReplaceObjectAt(aOther[i], i);
}
mArray.SizeTo(aOther.Count());
AppendObjects(aOther);
}
PRBool