зеркало из https://github.com/mozilla/gecko-dev.git
Fix for bug 174443. nsCOMArray::ApendObject() shouldn't addref
r=dougt, sr=alecf, a=asa
This commit is contained in:
Родитель
5ffe7b6c2b
Коммит
54b5577b97
|
@ -83,16 +83,6 @@ nsCOMArray_base::ReplaceObjectAt(nsISupports* aObject, PRInt32 aIndex)
|
|||
return result;
|
||||
}
|
||||
|
||||
|
||||
PRBool
|
||||
nsCOMArray_base::AppendObject(nsISupports *aObject)
|
||||
{
|
||||
PRBool result = InsertObjectAt(aObject, Count());
|
||||
if (result)
|
||||
NS_IF_ADDREF(aObject);
|
||||
return result;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsCOMArray_base::RemoveObject(nsISupports *aObject)
|
||||
{
|
||||
|
|
|
@ -72,7 +72,9 @@ protected:
|
|||
void Clear();
|
||||
PRBool InsertObjectAt(nsISupports* aObject, PRInt32 aIndex);
|
||||
PRBool ReplaceObjectAt(nsISupports* aObject, PRInt32 aIndex);
|
||||
PRBool AppendObject(nsISupports *aObject);
|
||||
PRBool AppendObject(nsISupports *aObject) {
|
||||
return InsertObjectAt(aObject, Count());
|
||||
}
|
||||
PRBool RemoveObject(nsISupports *aObject);
|
||||
PRBool RemoveObjectAt(PRInt32 aIndex);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче