nsNavHistoryResult::GetTopLevel(nsIArray** aTopLevel) { nsCOMPtr<nsIMutableArray> mutableArray; nsresult rv = NS_NewArray(getter_AddRefs(mutableArray), mTopLevelElements); NS_ENSURE_SUCCESS(rv, rv);  *aTopLevel = mutableArray; NS_ADDREF(*aTopLevel); return NS_OK; }
nsCOMArray<nsNavHistoryResultNode>* GetTopLevel() { return &mTopLevelElements; }
nsNavHistoryResult::GetTopLevel(nsIArray** aTopLevel){  nsCOMPtr<nsIMutableArray> mutableArray;  nsresult rv = NS_NewArray(getter_AddRefs(mutableArray), mTopLevelElements);  NS_ENSURE_SUCCESS(rv, rv);  *aTopLevel = mutableArray;  NS_ADDREF(*aTopLevel);  return NS_OK;}