# HG changeset patch # User Jorg K # Date 1508799539 -7200 # Node ID c38974cf236ed69bd7d45c938ec39a4f955233be # Parent c1201550a1b21ff7e9cc54fbd749211efcfb7bd9 Bug 1411069 - Port bug 1313150 to mailnews: Remove |weak| parameter from nsIMutableArray methods. rs=bustage-fix Affected: AppendElement(), InsertElementAt(), ReplaceElementAt(). diff --git a/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp b/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp --- a/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp +++ b/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp @@ -98,23 +98,23 @@ nsNetscapeProfileMigratorBase::GetProfil rootDir->SetPersistentDescriptor(filePath); if (NS_FAILED(rv)) continue; bool exists = false; rootDir->Exists(&exists); if (exists) { - aProfileLocations->AppendElement(rootDir, false); + aProfileLocations->AppendElement(rootDir); nsCOMPtr profileNameString( do_CreateInstance("@mozilla.org/supports-string;1")); profileNameString->SetData(NS_ConvertUTF8toUTF16(buffer)); - aProfileNames->AppendElement(profileNameString, false); + aProfileNames->AppendElement(profileNameString); } } return NS_OK; } #define GETPREF(xform, method, value) \ nsresult rv = aBranch->method(xform->sourcePrefName, value); \ if (NS_SUCCEEDED(rv)) \ diff --git a/mail/components/migration/src/nsProfileMigrator.cpp b/mail/components/migration/src/nsProfileMigrator.cpp --- a/mail/components/migration/src/nsProfileMigrator.cpp +++ b/mail/components/migration/src/nsProfileMigrator.cpp @@ -44,19 +44,19 @@ nsProfileMigrator::Migrate(nsIProfileSta cstr->SetData(key); // By opening the Migration FE with a supplied mailMigrator, it will automatically // migrate from it. nsCOMPtr ww (do_GetService(NS_WINDOWWATCHER_CONTRACTID)); nsCOMPtr params (do_CreateInstance(NS_ARRAY_CONTRACTID)); if (!ww || !params) return NS_ERROR_FAILURE; - params->AppendElement(cstr, false); - params->AppendElement(mailMigrator, false); - params->AppendElement(aStartup, false); + params->AppendElement(cstr); + params->AppendElement(mailMigrator); + params->AppendElement(aStartup); nsCOMPtr migrateWizard; return ww->OpenWindow(nullptr, MIGRATION_WIZARD_FE_URL, "_blank", MIGRATION_WIZARD_FE_FEATURES, params, getter_AddRefs(migrateWizard)); diff --git a/mailnews/addrbook/src/nsAbLDAPCard.cpp b/mailnews/addrbook/src/nsAbLDAPCard.cpp --- a/mailnews/addrbook/src/nsAbLDAPCard.cpp +++ b/mailnews/addrbook/src/nsAbLDAPCard.cpp @@ -93,24 +93,24 @@ NS_IMETHODIMP nsAbLDAPCard::GetLDAPMessa { nsCOMPtr value = do_CreateInstance("@mozilla.org/network/ldap-ber-value;1", &rv); NS_ENSURE_SUCCESS(rv, rv); rv = value->SetFromUTF8(m_objectClass.ElementAt(i)); NS_ENSURE_SUCCESS(rv, rv); - rv = values->AppendElement(value, false); + rv = values->AppendElement(value); NS_ENSURE_SUCCESS(rv, rv); } rv = mod->SetUpModification(aType, NS_LITERAL_CSTRING("objectClass"), values); NS_ENSURE_SUCCESS(rv, rv); - modArray->AppendElement(mod, false); + modArray->AppendElement(mod); // Add card properties CharPtrArrayGuard props; rv = aAttributeMap->GetAllCardProperties(props.GetSizeAddr(), props.GetArrayAddr()); NS_ENSURE_SUCCESS(rv, rv); nsAutoCString attr; @@ -159,17 +159,17 @@ NS_IMETHODIMP nsAbLDAPCard::GetLDAPMessa rv = value->SetFromUTF8(propvalue); NS_ENSURE_SUCCESS(rv, rv); rv = mod->SetUpModificationOneValue(aType, attr, value); NS_ENSURE_SUCCESS(rv, rv); printf("LDAP : setting attribute %s (%s) to '%s'\n", attr.get(), props[i], propvalue.get()); - modArray->AppendElement(mod, false); + modArray->AppendElement(mod); if (index != m_attributes.NoIndex) m_attributes.AppendElement(attr); } else if (aType == nsILDAPModification::MOD_REPLACE && index != m_attributes.NoIndex) { // If the new value is empty, we are performing an update @@ -177,17 +177,17 @@ NS_IMETHODIMP nsAbLDAPCard::GetLDAPMessa nsCOMPtr novalues = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); rv = mod->SetUpModification(aType, attr, novalues); NS_ENSURE_SUCCESS(rv, rv); printf("LDAP : removing attribute %s (%s)\n", attr.get(), props[i]); - modArray->AppendElement(mod, false); + modArray->AppendElement(mod); m_attributes.RemoveElementAt(index); } } NS_ADDREF(*aLDAPAddMessageInfo = modArray); return NS_OK; } diff --git a/mailnews/addrbook/src/nsAbMDBDirProperty.cpp b/mailnews/addrbook/src/nsAbMDBDirProperty.cpp --- a/mailnews/addrbook/src/nsAbMDBDirProperty.cpp +++ b/mailnews/addrbook/src/nsAbMDBDirProperty.cpp @@ -58,34 +58,34 @@ NS_IMETHODIMP nsAbMDBDirProperty::AddMai { nsresult rv; m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); } uint32_t position; if (NS_FAILED(m_AddressList->IndexOf(0, mailList, &position))) - m_AddressList->AppendElement(mailList, false); + m_AddressList->AppendElement(mailList); return NS_OK; } /* add addresses to the mailing list */ NS_IMETHODIMP nsAbMDBDirProperty::AddAddressToList(nsIAbCard *card) { if (!m_AddressList) { nsresult rv; m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); } uint32_t position; if (NS_FAILED(m_AddressList->IndexOf(0, card, &position))) - m_AddressList->AppendElement(card, false); + m_AddressList->AppendElement(card); return NS_OK; } NS_IMETHODIMP nsAbMDBDirProperty::CopyDBMailList(nsIAbMDBDirectory* srcListDB) { nsresult err = NS_OK; nsCOMPtr srcList(do_QueryInterface(srcListDB)); diff --git a/mailnews/addrbook/src/nsAbMDBDirectory.cpp b/mailnews/addrbook/src/nsAbMDBDirectory.cpp --- a/mailnews/addrbook/src/nsAbMDBDirectory.cpp +++ b/mailnews/addrbook/src/nsAbMDBDirectory.cpp @@ -394,17 +394,17 @@ NS_IMETHODIMP nsAbMDBDirectory::GetChild rv = StartSearch(); NS_ENSURE_SUCCESS(rv, rv); // TODO // Search is synchronous so need to return // results after search is complete nsCOMPtr array(do_CreateInstance(NS_ARRAY_CONTRACTID)); for (auto iter = mSearchCache.Iter(); !iter.Done(); iter.Next()) { - array->AppendElement(iter.Data(), false); + array->AppendElement(iter.Data()); } return NS_NewArrayEnumerator(result, array); } rv = GetAbDatabase(); if (NS_FAILED(rv) || !mDatabase) return rv; diff --git a/mailnews/addrbook/src/nsAbOSXDirectory.mm b/mailnews/addrbook/src/nsAbOSXDirectory.mm --- a/mailnews/addrbook/src/nsAbOSXDirectory.mm +++ b/mailnews/addrbook/src/nsAbOSXDirectory.mm @@ -835,32 +835,32 @@ nsAbOSXDirectory::AssertDirectory(nsIAbM return NS_OK; nsresult rv; if (!m_AddressList) { m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); } - rv = m_AddressList->AppendElement(aDirectory, false); + rv = m_AddressList->AppendElement(aDirectory); NS_ENSURE_SUCCESS(rv, rv); return aManager->NotifyDirectoryItemAdded(this, aDirectory); } nsresult nsAbOSXDirectory::AssertCard(nsIAbManager *aManager, nsIAbCard *aCard) { nsAutoCString ourUuid; GetUuid(ourUuid); aCard->SetDirectoryId(ourUuid); - nsresult rv = m_IsMailList ? m_AddressList->AppendElement(aCard, false) : - mCardList->AppendElement(aCard, false); + nsresult rv = m_IsMailList ? m_AddressList->AppendElement(aCard) : + mCardList->AppendElement(aCard); NS_ENSURE_SUCCESS(rv, rv); // Get the card's URI and add it to our card store nsCOMPtr osxCard = do_QueryInterface(aCard, &rv); NS_ENSURE_SUCCESS(rv, rv); nsCString uri; rv = osxCard->GetURI(uri); @@ -960,17 +960,17 @@ nsAbOSXDirectory::GetChildCards(nsISimpl if (NS_FAILED(rv)) rv = CreateCard([cards objectAtIndex:i], getter_AddRefs(card)); NS_ENSURE_SUCCESS(rv, rv); card->SetDirectoryId(ourUuid); - mCardList->AppendElement(card, false); + mCardList->AppendElement(card); } return NS_NewArrayEnumerator(aCards, mCardList); } // Not a search, so just return the appropriate list of items. return m_IsMailList ? NS_NewArrayEnumerator(aCards, m_AddressList) : NS_NewArrayEnumerator(aCards, mCardList); @@ -1204,20 +1204,20 @@ nsAbOSXDirectory::OnSearchFoundCard(nsIA NS_ENSURE_SUCCESS(rv, rv); } if (!mCardList) { mCardList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); } - rv = m_AddressList->AppendElement(aCard, false); + rv = m_AddressList->AppendElement(aCard); NS_ENSURE_SUCCESS(rv, rv); - rv = mCardList->AppendElement(aCard, false); + rv = mCardList->AppendElement(aCard); NS_ENSURE_SUCCESS(rv, rv); nsAutoCString ourUuid; GetUuid(ourUuid); aCard->SetDirectoryId(ourUuid); return NS_OK; } diff --git a/mailnews/addrbook/src/nsAbOutlookDirFactory.cpp b/mailnews/addrbook/src/nsAbOutlookDirFactory.cpp --- a/mailnews/addrbook/src/nsAbOutlookDirFactory.cpp +++ b/mailnews/addrbook/src/nsAbOutlookDirFactory.cpp @@ -60,17 +60,17 @@ nsAbOutlookDirFactory::GetDirectories(co for (ULONG i = 0; i < folders.mNbEntries; ++i) { folders.mEntries[i].ToString(entryId); buildAbWinUri(kOutlookDirectoryScheme, abType, uri); uri.Append(entryId); nsCOMPtr directory; rv = abManager->GetDirectory(uri, getter_AddRefs(directory)); NS_ENSURE_SUCCESS(rv, rv); - directories->AppendElement(directory, false); + directories->AppendElement(directory); } return NS_NewArrayEnumerator(aDirectories, directories); } // No actual deletion, since you cannot create the address books from Mozilla. NS_IMETHODIMP nsAbOutlookDirFactory::DeleteDirectory(nsIAbDirectory *aDirectory) { return NS_OK; diff --git a/mailnews/addrbook/src/nsAbOutlookDirectory.cpp b/mailnews/addrbook/src/nsAbOutlookDirectory.cpp --- a/mailnews/addrbook/src/nsAbOutlookDirectory.cpp +++ b/mailnews/addrbook/src/nsAbOutlookDirectory.cpp @@ -193,22 +193,22 @@ NS_IMETHODIMP nsAbOutlookDirectory::GetC // we must add the directory to m_AddressList nsCString mailListUri; rv = card->GetMailListURI(getter_Copies(mailListUri)); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr mailList; rv = abManager->GetDirectory(mailListUri, getter_AddRefs(mailList)); NS_ENSURE_SUCCESS(rv, rv); - m_AddressList->AppendElement(mailList, false); + m_AddressList->AppendElement(mailList); NotifyItemAddition(mailList); } else if (m_IsMailList) { - m_AddressList->AppendElement(card, false); + m_AddressList->AppendElement(card); NotifyItemAddition(card); } } } return rv; } NS_IMETHODIMP nsAbOutlookDirectory::GetIsQuery(bool *aResult) @@ -373,17 +373,17 @@ NS_IMETHODIMP nsAbOutlookDirectory::AddC if (!m_AddressList) { m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &retCode); NS_ENSURE_SUCCESS(retCode, retCode); } if (m_IsMailList) - m_AddressList->AppendElement(*addedCard, false); + m_AddressList->AppendElement(*addedCard); NotifyItemAddition(*addedCard) ; return retCode ; } NS_IMETHODIMP nsAbOutlookDirectory::DropCard(nsIAbCard *aData, bool needToCopyCard) { nsCOMPtr addedCard; return AddCard(aData, getter_AddRefs(addedCard)); @@ -442,17 +442,17 @@ NS_IMETHODIMP nsAbOutlookDirectory::AddM NS_ENSURE_SUCCESS(rv, rv); } if (!m_AddressList) { m_AddressList = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); } - m_AddressList->AppendElement(newList, false); + m_AddressList->AppendElement(newList); NotifyItemAddition(newList); NS_IF_ADDREF(*addedList = newList); return rv; } NS_IMETHODIMP nsAbOutlookDirectory::EditMailListToDatabase(nsIAbCard *listCard) { @@ -1037,17 +1037,17 @@ nsresult nsAbOutlookDirectory::GetChildC cardEntries.mEntries[card].ToString(entryId); buildAbWinUri(kOutlookCardScheme, mAbWinType, uriName); uriName.Append(entryId); rv = OutlookCardForURI(uriName, getter_AddRefs(childCard)); NS_ENSURE_SUCCESS(rv, rv); childCard->SetDirectoryId(ourUuid); - aCards->AppendElement(childCard, false); + aCards->AppendElement(childCard); } return rv; } nsresult nsAbOutlookDirectory::GetChildNodes(nsIMutableArray* aNodes) { NS_ENSURE_ARG_POINTER(aNodes); @@ -1077,17 +1077,17 @@ nsresult nsAbOutlookDirectory::GetChildN nodeEntries.mEntries[node].ToString(entryId); buildAbWinUri(kOutlookDirectoryScheme, mAbWinType, uriName); uriName.Append(entryId); nsCOMPtr directory; rv = abManager->GetDirectory(uriName, getter_AddRefs(directory)); NS_ENSURE_SUCCESS(rv, rv); - aNodes->AppendElement(directory, false); + aNodes->AppendElement(directory); } return rv; } nsresult nsAbOutlookDirectory::NotifyItemDeletion(nsISupports *aItem) { nsresult rv; nsCOMPtr abManager(do_GetService(NS_ABMANAGER_CONTRACTID, &rv)); @@ -1146,17 +1146,17 @@ nsresult nsAbOutlookDirectory::CommitAdd NS_ENSURE_SUCCESS(rv, rv); // The entry was not already there nsCOMPtr card(do_QueryInterface(element, &rv)); NS_ENSURE_SUCCESS(rv, rv); rv = CreateCard(card, getter_AddRefs(newCard)); NS_ENSURE_SUCCESS(rv, rv); - m_AddressList->ReplaceElementAt(newCard, i, false); + m_AddressList->ReplaceElementAt(newCard, i); } } return DeleteCards(oldList); } nsresult nsAbOutlookDirectory::UpdateAddressList(void) { if (!m_AddressList) diff --git a/mailnews/addrbook/src/nsAbQueryStringToExpression.cpp b/mailnews/addrbook/src/nsAbQueryStringToExpression.cpp --- a/mailnews/addrbook/src/nsAbQueryStringToExpression.cpp +++ b/mailnews/addrbook/src/nsAbQueryStringToExpression.cpp @@ -135,17 +135,17 @@ nsresult nsAbQueryStringToExpression::Pa // Case: ")(*)(*)....(*))" // printf ("Case: )(*)(*)....(*)): %s\n", *index); while (**index == '(') { nsCOMPtr childExpression; rv = ParseExpression(index, getter_AddRefs (childExpression)); NS_ENSURE_SUCCESS(rv, rv); - expressions->AppendElement(childExpression, false); + expressions->AppendElement(childExpression); } if (**index == 0) return NS_ERROR_FAILURE; // Case: "))" // printf ("Case: )): %s\n", *index); diff --git a/mailnews/addrbook/src/nsAbView.cpp b/mailnews/addrbook/src/nsAbView.cpp --- a/mailnews/addrbook/src/nsAbView.cpp +++ b/mailnews/addrbook/src/nsAbView.cpp @@ -1219,17 +1219,17 @@ nsresult nsAbView::GetSelectedCards(nsCO int32_t totalCards = mCards.Length(); if (startRange >= 0 && startRange < totalCards) { for (int32_t rangeIndex = startRange; rangeIndex <= endRange && rangeIndex < totalCards; rangeIndex++) { nsCOMPtr abCard; rv = GetCardFromRow(rangeIndex, getter_AddRefs(abCard)); NS_ENSURE_SUCCESS(rv,rv); - rv = aSelectedCards->AppendElement(abCard, false); + rv = aSelectedCards->AppendElement(abCard); NS_ENSURE_SUCCESS(rv, rv); } } } return NS_OK; } @@ -1415,28 +1415,28 @@ NS_IMETHODIMP nsAbView::GetSelectedAddre NS_ENSURE_SUCCESS(rv,rv); rv = mailListCard->GetPrimaryEmail(primaryEmail); NS_ENSURE_SUCCESS(rv,rv); if (!primaryEmail.IsEmpty()) { nsCOMPtr supportsEmail(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID)); supportsEmail->SetData(primaryEmail); - addresses->AppendElement(supportsEmail, false); + addresses->AppendElement(supportsEmail); } } } else { rv = card->GetPrimaryEmail(primaryEmail); NS_ENSURE_SUCCESS(rv,rv); if (!primaryEmail.IsEmpty()) { nsCOMPtr supportsEmail(do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID)); supportsEmail->SetData(primaryEmail); - addresses->AppendElement(supportsEmail, false); + addresses->AppendElement(supportsEmail); } } } NS_IF_ADDREF(*_retval = addresses); return NS_OK; } diff --git a/mailnews/addrbook/src/nsAddrDatabase.cpp b/mailnews/addrbook/src/nsAddrDatabase.cpp --- a/mailnews/addrbook/src/nsAddrDatabase.cpp +++ b/mailnews/addrbook/src/nsAddrDatabase.cpp @@ -1323,17 +1323,17 @@ NS_IMETHODIMP nsAddrDatabase::CreateNewL // start from 1 uint32_t totalAddress = GetListAddressTotal(pListRow) + 1; SetListAddressTotal(pListRow, totalAddress); nsCOMPtr pNewCard; rv = AddListCardColumnsToRow(newCard, pListRow, totalAddress, getter_AddRefs(pNewCard), true /* aInMailingList */, aList, nullptr); NS_ENSURE_SUCCESS(rv,rv); - addressList->AppendElement(newCard, false); + addressList->AppendElement(newCard); if (notify) NotifyCardEntryChange(AB_NotifyInserted, newCard, aList); return rv; } NS_IMETHODIMP nsAddrDatabase::AddListCardColumnsToRow @@ -1488,17 +1488,17 @@ nsresult nsAddrDatabase::AddListAttribut // start from 1 pos = i + 1; pCard->GetPrimaryEmail(email); if (!email.IsEmpty()) { nsCOMPtr pNewCard; err = AddListCardColumnsToRow(pCard, listRow, pos, getter_AddRefs(pNewCard), listHasCard, list, aParent); if (pNewCard) - pAddressLists->ReplaceElementAt(pNewCard, i, false); + pAddressLists->ReplaceElementAt(pNewCard, i); } } } return NS_OK; } uint32_t nsAddrDatabase::GetListAddressTotal(nsIMdbRow* listRow) { diff --git a/mailnews/base/search/src/nsMsgFilter.cpp b/mailnews/base/search/src/nsMsgFilter.cpp --- a/mailnews/base/search/src/nsMsgFilter.cpp +++ b/mailnews/base/search/src/nsMsgFilter.cpp @@ -240,17 +240,17 @@ NS_IMETHODIMP nsMsgFilter::AddTerm( } NS_IMETHODIMP nsMsgFilter::AppendTerm(nsIMsgSearchTerm * aTerm) { NS_ENSURE_TRUE(aTerm, NS_ERROR_NULL_POINTER); // invalidate expression tree if we're changing the terms delete m_expressionTree; m_expressionTree = nullptr; - return m_termList->AppendElement(aTerm, /* weak = */ false); + return m_termList->AppendElement(aTerm); } NS_IMETHODIMP nsMsgFilter::CreateTerm(nsIMsgSearchTerm **aResult) { NS_ENSURE_ARG_POINTER(aResult); nsMsgSearchTerm *term = new nsMsgSearchTerm; NS_ENSURE_TRUE(term, NS_ERROR_OUT_OF_MEMORY); @@ -312,56 +312,56 @@ nsMsgFilter::GetSortedActionList(nsIArra nsMsgRuleActionType actionType; action->GetType(&actionType); switch (actionType) { case nsMsgFilterAction::FetchBodyFromPop3Server: { // always insert in front - rv = orderedActions->InsertElementAt(action, 0, false); + rv = orderedActions->InsertElementAt(action, 0); NS_ENSURE_SUCCESS(rv, rv); ++nextIndexForNormal; ++nextIndexForCopy; ++nextIndexForMove; break; } case nsMsgFilterAction::CopyToFolder: { // insert into copy actions block, in order of appearance - rv = orderedActions->InsertElementAt(action, nextIndexForCopy, false); + rv = orderedActions->InsertElementAt(action, nextIndexForCopy); NS_ENSURE_SUCCESS(rv, rv); ++nextIndexForCopy; ++nextIndexForMove; break; } case nsMsgFilterAction::MoveToFolder: case nsMsgFilterAction::Delete: { // insert into move/delete action block - rv = orderedActions->InsertElementAt(action, nextIndexForMove, false); + rv = orderedActions->InsertElementAt(action, nextIndexForMove); NS_ENSURE_SUCCESS(rv, rv); ++nextIndexForMove; break; } case nsMsgFilterAction::StopExecution: { // insert into stop action block - rv = orderedActions->AppendElement(action, false); + rv = orderedActions->AppendElement(action); NS_ENSURE_SUCCESS(rv, rv); break; } default: { // insert into normal action block, in order of appearance - rv = orderedActions->InsertElementAt(action, nextIndexForNormal, false); + rv = orderedActions->InsertElementAt(action, nextIndexForNormal); NS_ENSURE_SUCCESS(rv, rv); ++nextIndexForNormal; ++nextIndexForCopy; ++nextIndexForMove; break; } } } diff --git a/mailnews/base/search/src/nsMsgFilterService.cpp b/mailnews/base/search/src/nsMsgFilterService.cpp --- a/mailnews/base/search/src/nsMsgFilterService.cpp +++ b/mailnews/base/search/src/nsMsgFilterService.cpp @@ -490,17 +490,17 @@ NS_IMETHODIMP nsMsgFilterAfterTheFact::O header->GetMessageKey(&msgKey); // Under various previous actions (a move, delete, or stopExecution) // we do not want to process filters on a per-message basis. if (m_stopFiltering.Contains(msgKey)) return NS_OK; m_searchHits.AppendElement(msgKey); - m_searchHitHdrs->AppendElement(header, false); + m_searchHitHdrs->AppendElement(header); return NS_OK; } // Continue after an async operation. NS_IMETHODIMP nsMsgFilterAfterTheFact::OnSearchDone(nsresult status) { if (NS_SUCCEEDED(status)) return m_searchHits.IsEmpty() ? RunNextFilter() : ApplyFilter(); @@ -809,17 +809,17 @@ nsresult nsMsgFilterAfterTheFact::ApplyF CONTINUE_IF_FALSE(msgHdr, "Could not get msgHdr"); uint32_t flags; msgHdr->GetFlags(&flags); if (flags & nsMsgMessageFlags::Partial) { if (!partialMsgs) partialMsgs = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); CONTINUE_IF_FALSE(partialMsgs, "Could not create partialMsgs array"); - partialMsgs->AppendElement(msgHdr, false); + partialMsgs->AppendElement(msgHdr); m_stopFiltering.AppendElement(m_searchHits[msgIndex]); m_curFolder->OrProcessingFlags(m_searchHits[msgIndex], nsMsgProcessingFlags::FilterToMove); } } if (partialMsgs) { m_curFolder->DeleteMessages(partialMsgs, m_msgWindow, true, false, nullptr, false); @@ -835,17 +835,17 @@ nsresult nsMsgFilterAfterTheFact::ApplyF CONTINUE_IF_FAILURE(rv, "Could not create messages array"); for (uint32_t msgIndex = 0; msgIndex < m_searchHits.Length(); msgIndex++) { nsCOMPtr msgHdr = do_QueryElementAt(m_searchHitHdrs, msgIndex); CONTINUE_IF_FALSE(msgHdr, "Could not get msgHdr"); uint32_t flags = 0; msgHdr->GetFlags(&flags); if (flags & nsMsgMessageFlags::Partial) - messages->AppendElement(msgHdr, false); + messages->AppendElement(msgHdr); } uint32_t msgsToFetch; messages->GetLength(&msgsToFetch); if (msgsToFetch > 0) { rv = m_curFolder->DownloadMessagesForOffline(messages, m_msgWindow); CONTINUE_IF_FAILURE(rv, "DownloadMessagesForOffline failed"); } @@ -1101,17 +1101,17 @@ NS_IMETHODIMP nsMsgFilterService::ApplyF nsCOMPtr filterList; nsresult rv = aFolder->GetFilterList(aMsgWindow, getter_AddRefs(filterList)); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr folderList(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); - folderList->AppendElement(aFolder, false); + folderList->AppendElement(aFolder); // Create our nsMsgApplyFiltersToMessages object which will be called when ApplyFiltersToHdr // finds one or more filters that hit. RefPtr filterExecutor = new nsMsgApplyFiltersToMessages(aMsgWindow, filterList, folderList, aMsgHdrList, aFilterType, aCallback); if (filterExecutor) diff --git a/mailnews/base/search/src/nsMsgSearchSession.cpp b/mailnews/base/search/src/nsMsgSearchSession.cpp --- a/mailnews/base/search/src/nsMsgSearchSession.cpp +++ b/mailnews/base/search/src/nsMsgSearchSession.cpp @@ -57,31 +57,31 @@ nsMsgSearchSession::AddSearchTerm(nsMsgS if (BooleanANDp) boolOp = (nsMsgSearchBooleanOperator)nsMsgSearchBooleanOp::BooleanAND; else boolOp = (nsMsgSearchBooleanOperator)nsMsgSearchBooleanOp::BooleanOR; nsMsgSearchTerm *pTerm = new nsMsgSearchTerm(attrib, op, value, boolOp, customString); NS_ENSURE_TRUE(pTerm, NS_ERROR_OUT_OF_MEMORY); - m_termList->AppendElement(pTerm, /* weak = */ false); + m_termList->AppendElement(pTerm); // force the expression tree to rebuild whenever we change the terms delete m_expressionTree; m_expressionTree = nullptr; return NS_OK; } NS_IMETHODIMP nsMsgSearchSession::AppendTerm(nsIMsgSearchTerm *aTerm) { NS_ENSURE_ARG_POINTER(aTerm); NS_ENSURE_TRUE(m_termList, NS_ERROR_NOT_INITIALIZED); delete m_expressionTree; m_expressionTree = nullptr; - return m_termList->AppendElement(aTerm, /* weak = */ false); + return m_termList->AppendElement(aTerm); } NS_IMETHODIMP nsMsgSearchSession::GetSearchTerms(nsIMutableArray **aResult) { NS_ENSURE_ARG_POINTER(aResult); *aResult = m_termList; NS_ADDREF(*aResult); diff --git a/mailnews/base/src/nsMessenger.cpp b/mailnews/base/src/nsMessenger.cpp --- a/mailnews/base/src/nsMessenger.cpp +++ b/mailnews/base/src/nsMessenger.cpp @@ -2670,17 +2670,17 @@ nsDelAttachListener::OnStartRunningUrl(n } nsresult nsDelAttachListener::DeleteOriginalMessage() { nsresult rv; nsCOMPtr messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); - rv = messageArray->AppendElement(mOriginalMessage, false); + rv = messageArray->AppendElement(mOriginalMessage); NS_ENSURE_SUCCESS(rv,rv); nsCOMPtr listenerCopyService; QueryInterface( NS_GET_IID(nsIMsgCopyServiceListener), getter_AddRefs(listenerCopyService) ); mOriginalMessage = nullptr; m_state = eDeletingOldMessage; return mMessageFolder->DeleteMessages( diff --git a/mailnews/base/src/nsMessengerBootstrap.cpp b/mailnews/base/src/nsMessengerBootstrap.cpp --- a/mailnews/base/src/nsMessengerBootstrap.cpp +++ b/mailnews/base/src/nsMessengerBootstrap.cpp @@ -49,30 +49,30 @@ NS_IMETHODIMP nsMessengerBootstrap::Open nsAutoCString msgUri; folder->GetBaseMessageURI(msgUri); nsCOMPtr scriptableMsgURI (do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID)); NS_ENSURE_TRUE(scriptableMsgURI, NS_ERROR_FAILURE); msgUri.Append('#'); msgUri.AppendInt(aMessageKey, 10); scriptableMsgURI->SetData(msgUri); - argsArray->AppendElement(scriptableMsgURI, false); + argsArray->AppendElement(scriptableMsgURI); } nsCOMPtr scriptableFolderURI (do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID)); NS_ENSURE_TRUE(scriptableFolderURI, NS_ERROR_FAILURE); scriptableFolderURI->SetData(nsDependentCString(aFolderURI)); - argsArray->AppendElement(scriptableFolderURI, false); + argsArray->AppendElement(scriptableFolderURI); if (!standAloneMsgWindow) { nsCOMPtr scriptableMessageKey (do_CreateInstance(NS_SUPPORTS_PRUINT32_CONTRACTID)); NS_ENSURE_TRUE(scriptableMessageKey, NS_ERROR_FAILURE); scriptableMessageKey->SetData(aMessageKey); - argsArray->AppendElement(scriptableMessageKey, false); + argsArray->AppendElement(scriptableMessageKey); } } nsCOMPtr wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); // we need to use the "mailnews.reuse_thread_window2" pref // to determine if we should open a new window, or use an existing one. diff --git a/mailnews/base/src/nsMessengerUnixIntegration.cpp b/mailnews/base/src/nsMessengerUnixIntegration.cpp --- a/mailnews/base/src/nsMessengerUnixIntegration.cpp +++ b/mailnews/base/src/nsMessengerUnixIntegration.cpp @@ -380,31 +380,31 @@ nsresult nsMessengerUnixIntegration::Sho if (!argsArray) return NS_ERROR_FAILURE; // pass in the array of folders with unread messages nsCOMPtr ifptr = do_CreateInstance(NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); ifptr->SetData(mFoldersWithNewMail); ifptr->SetDataIID(&NS_GET_IID(nsIArray)); - argsArray->AppendElement(ifptr, false); + argsArray->AppendElement(ifptr); // pass in the observer ifptr = do_CreateInstance(NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr supports = do_QueryInterface(static_cast(this)); ifptr->SetData(supports); ifptr->SetDataIID(&NS_GET_IID(nsIObserver)); - argsArray->AppendElement(ifptr, false); + argsArray->AppendElement(ifptr); // pass in the animation flag nsCOMPtr scriptableUserInitiated (do_CreateInstance(NS_SUPPORTS_PRBOOL_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); scriptableUserInitiated->SetData(aUserInitiated); - argsArray->AppendElement(scriptableUserInitiated, false); + argsArray->AppendElement(scriptableUserInitiated); nsCOMPtr wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID)); nsCOMPtr newWindow; mAlertInProgress = true; rv = wwatch->OpenWindow(0, ALERT_CHROME_URL, "_blank", "chrome,dialog=yes,titlebar=no,popup=yes", argsArray, getter_AddRefs(newWindow)); @@ -690,17 +690,17 @@ nsMessengerUnixIntegration::OnItemIntPro nsCOMPtr server; aItem->GetServer(getter_AddRefs(server)); if (server) server->GetPerformingBiff(&performingBiff); if (!performingBiff) return NS_OK; // kick out right now... if (!folderFound) - mFoldersWithNewMail->AppendElement(weakFolder, false); + mFoldersWithNewMail->AppendElement(weakFolder); // now regenerate the tooltip FillToolTipInfo(); } else if (aNewValue == nsIMsgFolder::nsMsgBiffState_NoMail) { if (folderFound) { mFoldersWithNewMail->RemoveElementAt(indexInNewArray); } diff --git a/mailnews/base/src/nsMessengerWinIntegration.cpp b/mailnews/base/src/nsMessengerWinIntegration.cpp --- a/mailnews/base/src/nsMessengerWinIntegration.cpp +++ b/mailnews/base/src/nsMessengerWinIntegration.cpp @@ -490,44 +490,44 @@ nsresult nsMessengerWinIntegration::Show nsCOMPtr argsArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); // pass in the array of folders with unread messages nsCOMPtr ifptr = do_CreateInstance(NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); ifptr->SetData(mFoldersWithNewMail); ifptr->SetDataIID(&NS_GET_IID(nsIArray)); - rv = argsArray->AppendElement(ifptr, false); + rv = argsArray->AppendElement(ifptr); NS_ENSURE_SUCCESS(rv, rv); // pass in the observer ifptr = do_CreateInstance(NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr supports = do_QueryInterface(static_cast(this)); ifptr->SetData(supports); ifptr->SetDataIID(&NS_GET_IID(nsIObserver)); - rv = argsArray->AppendElement(ifptr, false); + rv = argsArray->AppendElement(ifptr); NS_ENSURE_SUCCESS(rv, rv); // pass in the animation flag nsCOMPtr scriptableUserInitiated (do_CreateInstance(NS_SUPPORTS_PRBOOL_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); scriptableUserInitiated->SetData(aUserInitiated); - rv = argsArray->AppendElement(scriptableUserInitiated, false); + rv = argsArray->AppendElement(scriptableUserInitiated); NS_ENSURE_SUCCESS(rv, rv); // pass in the alert origin nsCOMPtr scriptableOrigin (do_CreateInstance(NS_SUPPORTS_PRUINT8_CONTRACTID)); NS_ENSURE_TRUE(scriptableOrigin, NS_ERROR_FAILURE); scriptableOrigin->SetData(0); int32_t origin = 0; origin = LookAndFeel::GetInt(LookAndFeel::eIntID_AlertNotificationOrigin); scriptableOrigin->SetData(origin); - rv = argsArray->AppendElement(scriptableOrigin, false); + rv = argsArray->AppendElement(scriptableOrigin); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr wwatch(do_GetService(NS_WINDOWWATCHER_CONTRACTID)); nsCOMPtr newWindow; rv = wwatch->OpenWindow(0, ALERT_CHROME_URL, "_blank", "chrome,dialog=yes,titlebar=no,popup=yes", argsArray, getter_AddRefs(newWindow)); @@ -867,17 +867,17 @@ nsMessengerWinIntegration::OnItemIntProp nsCOMPtr server; aItem->GetServer(getter_AddRefs(server)); if (server) server->GetPerformingBiff(&performingBiff); if (!performingBiff) return NS_OK; // kick out right now... } if (!folderFound) - mFoldersWithNewMail->InsertElementAt(weakFolder, 0, false); + mFoldersWithNewMail->InsertElementAt(weakFolder, 0); // now regenerate the tooltip FillToolTipInfo(); } else if (aNewValue == nsIMsgFolder::nsMsgBiffState_NoMail) { // we are always going to remove the icon whenever we get our first no mail // notification. diff --git a/mailnews/base/src/nsMsgAccount.cpp b/mailnews/base/src/nsMsgAccount.cpp --- a/mailnews/base/src/nsMsgAccount.cpp +++ b/mailnews/base/src/nsMsgAccount.cpp @@ -263,31 +263,31 @@ nsMsgAccount::SetDefaultIdentity(nsIMsgI uint32_t position = 0; nsresult rv = m_identities->IndexOf(0, aDefaultIdentity, &position); NS_ENSURE_SUCCESS(rv, rv); rv = m_identities->RemoveElementAt(position); NS_ENSURE_SUCCESS(rv, rv); // The passed in identity is in the list, so we have at least one element. - rv = m_identities->InsertElementAt(aDefaultIdentity, 0, false); + rv = m_identities->InsertElementAt(aDefaultIdentity, 0); NS_ENSURE_SUCCESS(rv, rv); return saveIdentitiesPref(); } // add the identity to m_identities, but don't fiddle with the // prefs. The assumption here is that the pref for this identity is // already set. nsresult nsMsgAccount::addIdentityInternal(nsIMsgIdentity *identity) { NS_ENSURE_TRUE(m_identities, NS_ERROR_FAILURE); - return m_identities->AppendElement(identity, false); + return m_identities->AppendElement(identity); } /* void addIdentity (in nsIMsgIdentity identity); */ NS_IMETHODIMP nsMsgAccount::AddIdentity(nsIMsgIdentity *identity) { NS_ENSURE_ARG_POINTER(identity); diff --git a/mailnews/base/src/nsMsgAccountManager.cpp b/mailnews/base/src/nsMsgAccountManager.cpp --- a/mailnews/base/src/nsMsgAccountManager.cpp +++ b/mailnews/base/src/nsMsgAccountManager.cpp @@ -919,17 +919,17 @@ nsMsgAccountManager::GetAccounts(nsIArra continue; if (server) { bool hidden = false; server->GetHidden(&hidden); if (hidden) continue; } - accounts->AppendElement(existingAccount, false); + accounts->AppendElement(existingAccount); } NS_IF_ADDREF(*_retval = accounts); return NS_OK; } NS_IMETHODIMP nsMsgAccountManager::GetAllIdentities(nsIArray **_retval) { @@ -977,17 +977,17 @@ nsMsgAccountManager::GetAllIdentities(ns if (NS_FAILED(rv)) continue; if (key == thisKey) found = true; } if (!found) - result->AppendElement(identity, false); + result->AppendElement(identity); } } result.forget(_retval); return rv; } NS_IMETHODIMP nsMsgAccountManager::GetAllServers(nsIArray **_retval) @@ -1010,17 +1010,17 @@ nsMsgAccountManager::GetAllServers(nsIAr nsCString type; if (NS_FAILED(server->GetType(type))) { NS_WARNING("server->GetType() failed"); continue; } if (!type.EqualsLiteral("im")) { - servers->AppendElement(server, false); + servers->AppendElement(server); } } servers.forget(_retval); return rv; } nsresult @@ -2130,17 +2130,17 @@ nsMsgAccountManager::GetIdentitiesForSer uint32_t theseLength; rv = theseIdentities->GetLength(&theseLength); if (NS_SUCCEEDED(rv)) { for (uint32_t j = 0; j < theseLength; ++j) { nsCOMPtr id(do_QueryElementAt(theseIdentities, j, &rv)); if (NS_SUCCEEDED(rv)) - identities->AppendElement(id, false); + identities->AppendElement(id); } } } } } identities.forget(_retval); return NS_OK; @@ -2181,17 +2181,17 @@ nsMsgAccountManager::GetServersForIdenti rv = thisIdentity->GetKey(thisIdentityKey); if (NS_SUCCEEDED(rv) && identityKey.Equals(thisIdentityKey)) { nsCOMPtr thisServer; rv = m_accounts[i]->GetIncomingServer(getter_AddRefs(thisServer)); if (thisServer && NS_SUCCEEDED(rv)) { - servers->AppendElement(thisServer, false); + servers->AppendElement(thisServer); break; } } } } } servers.forget(_retval); return NS_OK; diff --git a/mailnews/base/src/nsMsgAccountManagerDS.cpp b/mailnews/base/src/nsMsgAccountManagerDS.cpp --- a/mailnews/base/src/nsMsgAccountManagerDS.cpp +++ b/mailnews/base/src/nsMsgAccountManagerDS.cpp @@ -757,48 +757,48 @@ nsMsgAccountManagerDataSource::serverHas nsresult nsMsgAccountManagerDataSource::getAccountArcs(nsIMutableArray **aResult) { nsresult rv; if (!mAccountArcsOut) { mAccountArcsOut = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); - mAccountArcsOut->AppendElement(kNC_Settings, false); - mAccountArcsOut->AppendElement(kNC_Name, false); - mAccountArcsOut->AppendElement(kNC_FolderTreeName, false); - mAccountArcsOut->AppendElement(kNC_FolderTreeSimpleName, false); - mAccountArcsOut->AppendElement(kNC_NameSort, false); - mAccountArcsOut->AppendElement(kNC_FolderTreeNameSort, false); - mAccountArcsOut->AppendElement(kNC_PageTag, false); + mAccountArcsOut->AppendElement(kNC_Settings); + mAccountArcsOut->AppendElement(kNC_Name); + mAccountArcsOut->AppendElement(kNC_FolderTreeName); + mAccountArcsOut->AppendElement(kNC_FolderTreeSimpleName); + mAccountArcsOut->AppendElement(kNC_NameSort); + mAccountArcsOut->AppendElement(kNC_FolderTreeNameSort); + mAccountArcsOut->AppendElement(kNC_PageTag); } *aResult = mAccountArcsOut; NS_IF_ADDREF(*aResult); return NS_OK; } nsresult nsMsgAccountManagerDataSource::getAccountRootArcs(nsIMutableArray **aResult) { nsresult rv; if (!mAccountRootArcsOut) { mAccountRootArcsOut = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); - mAccountRootArcsOut->AppendElement(kNC_Server, false); - mAccountRootArcsOut->AppendElement(kNC_Child, false); + mAccountRootArcsOut->AppendElement(kNC_Server); + mAccountRootArcsOut->AppendElement(kNC_Child); - mAccountRootArcsOut->AppendElement(kNC_Settings, false); - mAccountRootArcsOut->AppendElement(kNC_Name, false); - mAccountRootArcsOut->AppendElement(kNC_FolderTreeName, false); - mAccountRootArcsOut->AppendElement(kNC_FolderTreeSimpleName, false); - mAccountRootArcsOut->AppendElement(kNC_NameSort, false); - mAccountRootArcsOut->AppendElement(kNC_FolderTreeNameSort, false); - mAccountRootArcsOut->AppendElement(kNC_PageTag, false); + mAccountRootArcsOut->AppendElement(kNC_Settings); + mAccountRootArcsOut->AppendElement(kNC_Name); + mAccountRootArcsOut->AppendElement(kNC_FolderTreeName); + mAccountRootArcsOut->AppendElement(kNC_FolderTreeSimpleName); + mAccountRootArcsOut->AppendElement(kNC_NameSort); + mAccountRootArcsOut->AppendElement(kNC_FolderTreeNameSort); + mAccountRootArcsOut->AppendElement(kNC_PageTag); } *aResult = mAccountRootArcsOut; NS_IF_ADDREF(*aResult); return NS_OK; } NS_IMETHODIMP diff --git a/mailnews/base/src/nsMsgCopyService.cpp b/mailnews/base/src/nsMsgCopyService.cpp --- a/mailnews/base/src/nsMsgCopyService.cpp +++ b/mailnews/base/src/nsMsgCopyService.cpp @@ -37,17 +37,17 @@ nsCopySource::nsCopySource(nsIMsgFolder* nsCopySource::~nsCopySource() { MOZ_COUNT_DTOR(nsCopySource); } void nsCopySource::AddMessage(nsIMsgDBHdr* aMsg) { - m_messageArray->AppendElement(aMsg, false); + m_messageArray->AppendElement(aMsg); } // ************ nsCopyRequest ***************** // nsCopyRequest::nsCopyRequest() : m_requestType(nsCopyMessagesType), m_isMoveOrDraftOrTemplate(false), diff --git a/mailnews/base/src/nsMsgDBView.cpp b/mailnews/base/src/nsMsgDBView.cpp --- a/mailnews/base/src/nsMsgDBView.cpp +++ b/mailnews/base/src/nsMsgDBView.cpp @@ -2826,17 +2826,17 @@ nsresult nsMsgDBView::ListCollapsedChild uint32_t numChildren; thread->GetNumChildren(&numChildren); for (uint32_t i = 1; i < numChildren && NS_SUCCEEDED(rv); i++) { nsCOMPtr msgHdr; rv = thread->GetChildHdrAt(i, getter_AddRefs(msgHdr)); if (!msgHdr) continue; - rv = messageArray->AppendElement(msgHdr, false); + rv = messageArray->AppendElement(msgHdr); } return rv; } bool nsMsgDBView::OperateOnMsgsInCollapsedThreads() { if (mTreeSelection) { @@ -2881,17 +2881,17 @@ nsresult nsMsgDBView::GetHeadersFromSele m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay) rv = ListCollapsedChildren(viewIndex, messageArray); continue; } nsCOMPtr msgHdr; rv = GetMsgHdrForViewIndex(viewIndex, getter_AddRefs(msgHdr)); if (NS_SUCCEEDED(rv) && msgHdr) { - rv = messageArray->AppendElement(msgHdr, false); + rv = messageArray->AppendElement(msgHdr); if (NS_SUCCEEDED(rv) && includeCollapsedMsgs && viewIndexFlags & nsMsgMessageFlags::Elided && viewIndexFlags & MSG_VIEW_FLAG_HASCHILDREN && m_viewFlags & nsMsgViewFlagsType::kThreadedDisplay) { rv = ListCollapsedChildren(viewIndex, messageArray); } } @@ -3030,23 +3030,23 @@ nsMsgDBView::ApplyCommandToIndices(nsMsg msgHdr->GetMessageKey(&msgKey); if (thisIsImapFolder) imapUids[i] = msgKey; switch (command) { case nsMsgViewCommandType::junk: mNumMessagesRemainingInBatch++; - mJunkHdrs->AppendElement(msgHdr, false); + mJunkHdrs->AppendElement(msgHdr); rv = SetMsgHdrJunkStatus(junkPlugin.get(), msgHdr, nsIJunkMailPlugin::JUNK); break; case nsMsgViewCommandType::unjunk: mNumMessagesRemainingInBatch++; - mJunkHdrs->AppendElement(msgHdr, false); + mJunkHdrs->AppendElement(msgHdr); rv = SetMsgHdrJunkStatus(junkPlugin.get(), msgHdr, nsIJunkMailPlugin::GOOD); break; case nsMsgViewCommandType::toggleMessageRead: case nsMsgViewCommandType::undeleteMsg: case nsMsgViewCommandType::markMessagesRead: case nsMsgViewCommandType::markMessagesUnread: case nsMsgViewCommandType::unflagMessages: @@ -3300,17 +3300,17 @@ nsresult nsMsgDBView::DownloadForOffline nsCOMPtr msgHdr; rv = m_db->GetMsgHdrForKey(key, getter_AddRefs(msgHdr)); NS_ENSURE_SUCCESS(rv,rv); if (msgHdr) { uint32_t flags; msgHdr->GetFlags(&flags); if (!(flags & nsMsgMessageFlags::Offline)) - messageArray->AppendElement(msgHdr, false); + messageArray->AppendElement(msgHdr); } } m_folder->DownloadMessagesForOffline(messageArray, window); return rv; } nsresult nsMsgDBView::DownloadFlaggedForOffline(nsIMsgWindow *window) { @@ -3328,17 +3328,17 @@ nsresult nsMsgDBView::DownloadFlaggedFor rv = enumerator->GetNext(getter_AddRefs(supports)); NS_ASSERTION(NS_SUCCEEDED(rv), "nsMsgDBEnumerator broken"); nsCOMPtr pHeader = do_QueryInterface(supports); if (pHeader && NS_SUCCEEDED(rv)) { uint32_t flags; pHeader->GetFlags(&flags); if ((flags & nsMsgMessageFlags::Marked) && !(flags & nsMsgMessageFlags::Offline)) - messageArray->AppendElement(pHeader, false); + messageArray->AppendElement(pHeader); } } } m_folder->DownloadMessagesForOffline(messageArray, window); return rv; } // read/unread handling. @@ -3624,17 +3624,17 @@ nsMsgDBView::PerformActionsOnJunkMsgs(bo for (uint32_t i = 0; i < cnt; i++) { nsCOMPtr msgHdr = do_QueryElementAt(mJunkHdrs, i); if (msgHdr) { uint32_t flags; msgHdr->GetFlags(&flags); if (!(flags & nsMsgMessageFlags::IMAPDeleted)) - hdrsToDelete->AppendElement(msgHdr, false); + hdrsToDelete->AppendElement(msgHdr); } } hdrsToDelete->GetLength(&cnt); if (cnt) rv = srcFolder->DeleteMessages(hdrsToDelete, msgWindow, false, false, nullptr, true); } else diff --git a/mailnews/base/src/nsMsgFolderDataSource.cpp b/mailnews/base/src/nsMsgFolderDataSource.cpp --- a/mailnews/base/src/nsMsgFolderDataSource.cpp +++ b/mailnews/base/src/nsMsgFolderDataSource.cpp @@ -604,29 +604,29 @@ nsMsgFolderDataSource::GetAllCmds(nsIRDF nsCOMPtr folder(do_QueryInterface(source, &rv)); if (NS_FAILED(rv)) return rv; nsCOMPtr cmds = do_CreateInstance(NS_ARRAY_CONTRACTID); NS_ENSURE_STATE(cmds); - cmds->AppendElement(kNC_Delete, false); - cmds->AppendElement(kNC_ReallyDelete, false); - cmds->AppendElement(kNC_NewFolder, false); - cmds->AppendElement(kNC_GetNewMessages, false); - cmds->AppendElement(kNC_Copy, false); - cmds->AppendElement(kNC_Move, false); - cmds->AppendElement(kNC_CopyFolder, false); - cmds->AppendElement(kNC_MoveFolder, false); - cmds->AppendElement(kNC_MarkAllMessagesRead, false); - cmds->AppendElement(kNC_Compact, false); - cmds->AppendElement(kNC_CompactAll, false); - cmds->AppendElement(kNC_Rename, false); - cmds->AppendElement(kNC_EmptyTrash, false); + cmds->AppendElement(kNC_Delete); + cmds->AppendElement(kNC_ReallyDelete); + cmds->AppendElement(kNC_NewFolder); + cmds->AppendElement(kNC_GetNewMessages); + cmds->AppendElement(kNC_Copy); + cmds->AppendElement(kNC_Move); + cmds->AppendElement(kNC_CopyFolder); + cmds->AppendElement(kNC_MoveFolder); + cmds->AppendElement(kNC_MarkAllMessagesRead); + cmds->AppendElement(kNC_Compact); + cmds->AppendElement(kNC_CompactAll); + cmds->AppendElement(kNC_Rename); + cmds->AppendElement(kNC_EmptyTrash); return cmds->Enumerate(commands); } NS_IMETHODIMP nsMsgFolderDataSource::IsCommandEnabled(nsISupports/*nsISupportsArray*/* aSources, nsIRDFResource* aCommand, nsISupports/*nsISupportsArray*/* aArguments, @@ -1866,17 +1866,17 @@ nsresult nsMsgFolderDataSource::DoCopyTo nsCOMPtr messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID)); // Remove first element for(uint32_t i = 1; i < itemCount; i++) { nsCOMPtr message(do_QueryElementAt(arguments, i)); if (message) { - messageArray->AppendElement(message, false); + messageArray->AppendElement(message); } } //Call copyservice with dstFolder, srcFolder, messages, isMove, and txnManager nsCOMPtr copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv,rv); @@ -1899,17 +1899,17 @@ nsresult nsMsgFolderDataSource::DoFolder if (!isMoveFolder) // copy folder not on the same server { // Create an nsIMutableArray from the nsISupportsArray nsCOMPtr folderArray(do_CreateInstance(NS_ARRAY_CONTRACTID)); for (uint32_t i = 0; i < itemCount; i++) { nsCOMPtr element(do_QueryElementAt(arguments, i, &rv)); if (NS_SUCCEEDED(rv)) - folderArray->AppendElement(element, false); + folderArray->AppendElement(element); } //Call copyservice with dstFolder, srcFolder, folders and isMoveFolder nsCOMPtr copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv); if(NS_SUCCEEDED(rv)) { rv = copyService->CopyFolders(folderArray, dstFolder, isMoveFolder, nullptr, msgWindow); @@ -1950,21 +1950,21 @@ nsresult nsMsgFolderDataSource::DoDelete //for deletion. for(uint32_t item = 0; item < itemCount; item++) { nsCOMPtr supports(do_QueryElementAt(arguments, item)); nsCOMPtr deletedMessage(do_QueryInterface(supports)); nsCOMPtr deletedFolder(do_QueryInterface(supports)); if (deletedMessage) { - messageArray->AppendElement(supports, false); + messageArray->AppendElement(supports); } else if(deletedFolder) { - folderArray->AppendElement(supports, false); + folderArray->AppendElement(supports); } } uint32_t cnt; rv = messageArray->GetLength(&cnt); if (NS_FAILED(rv)) return rv; if (cnt > 0) rv = folder->DeleteMessages(messageArray, msgWindow, reallyDelete, false, nullptr, true /*allowUndo*/); diff --git a/mailnews/base/src/nsMsgProgress.cpp b/mailnews/base/src/nsMsgProgress.cpp --- a/mailnews/base/src/nsMsgProgress.cpp +++ b/mailnews/base/src/nsMsgProgress.cpp @@ -62,18 +62,18 @@ NS_IMETHODIMP nsMsgProgress::OpenProgres nsCOMPtr ifptr = do_CreateInstance(NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); ifptr->SetData(static_cast(this)); ifptr->SetDataIID(&NS_GET_IID(nsIMsgProgress)); - array->AppendElement(ifptr, false); - array->AppendElement(parameters, false); + array->AppendElement(ifptr); + array->AppendElement(parameters); // Open the dialog. nsCOMPtr newWindow; nsString chromeOptions(NS_LITERAL_STRING("chrome,dependent,centerscreen")); if (inDisplayModal) chromeOptions.AppendLiteral(",modal"); diff --git a/mailnews/base/src/nsMsgPurgeService.cpp b/mailnews/base/src/nsMsgPurgeService.cpp --- a/mailnews/base/src/nsMsgPurgeService.cpp +++ b/mailnews/base/src/nsMsgPurgeService.cpp @@ -448,17 +448,17 @@ NS_IMETHODIMP nsMsgPurgeService::OnSearc MOZ_LOG(MsgPurgeLogModule, mozilla::LogLevel::Info, ("junkScore=%s (if empty or != nsIJunkMailPlugin::IS_SPAM_SCORE, don't add to list delete)", junkScoreStr.get())); // if "junkscore" is not set, don't delete the message if (junkScoreStr.IsEmpty()) return NS_OK; if (atoi(junkScoreStr.get()) == nsIJunkMailPlugin::IS_SPAM_SCORE) { MOZ_LOG(MsgPurgeLogModule, mozilla::LogLevel::Info, ("added message to delete")); - return mHdrsToDelete->AppendElement(aMsgHdr, false); + return mHdrsToDelete->AppendElement(aMsgHdr); } return NS_OK; } NS_IMETHODIMP nsMsgPurgeService::OnSearchDone(nsresult status) { if (NS_SUCCEEDED(status)) { diff --git a/mailnews/base/src/nsMsgQuickSearchDBView.cpp b/mailnews/base/src/nsMsgQuickSearchDBView.cpp --- a/mailnews/base/src/nsMsgQuickSearchDBView.cpp +++ b/mailnews/base/src/nsMsgQuickSearchDBView.cpp @@ -598,17 +598,17 @@ nsMsgQuickSearchDBView::ListCollapsedChi if (msgHdr) { nsMsgKey msgKey; msgHdr->GetMessageKey(&msgKey); if (msgKey != rootKey || (GroupViewUsesDummyRow() && rootKeySkipped)) { // if this hdr is in the original view, add it to new view. if (m_origKeys.BinaryIndexOf(msgKey) != m_origKeys.NoIndex) - messageArray->AppendElement(msgHdr, false); + messageArray->AppendElement(msgHdr); } else { rootKeySkipped = true; } } } return NS_OK; diff --git a/mailnews/base/src/nsMsgSearchDBView.cpp b/mailnews/base/src/nsMsgSearchDBView.cpp --- a/mailnews/base/src/nsMsgSearchDBView.cpp +++ b/mailnews/base/src/nsMsgSearchDBView.cpp @@ -967,17 +967,17 @@ nsMsgSearchDBView::GetFoldersAndHdrsForS nsCOMPtr hdr = do_QueryElementAt(messages, i, &rv); if (hdr) { nsCOMPtr msgFolder; hdr->GetFolder(getter_AddRefs(msgFolder)); if (NS_SUCCEEDED(rv) && msgFolder && msgFolder == curFolder) { nsCOMPtr hdrSupports = do_QueryInterface(hdr); - msgHdrsForOneFolder->AppendElement(hdrSupports, false); + msgHdrsForOneFolder->AppendElement(hdrSupports); } } } m_hdrsForEachFolder.AppendElement(msgHdrsForOneFolder); } return rv; } diff --git a/mailnews/base/util/nsImapMoveCoalescer.cpp b/mailnews/base/util/nsImapMoveCoalescer.cpp --- a/mailnews/base/util/nsImapMoveCoalescer.cpp +++ b/mailnews/base/util/nsImapMoveCoalescer.cpp @@ -82,17 +82,17 @@ nsresult nsImapMoveCoalescer::PlaybackMo nsCOMPtr messages(do_CreateInstance(NS_ARRAY_CONTRACTID)); for (uint32_t keyIndex = 0; keyIndex < keysToAdd.Length(); keyIndex++) { nsCOMPtr mailHdr = nullptr; rv = m_sourceFolder->GetMessageHeader(keysToAdd.ElementAt(keyIndex), getter_AddRefs(mailHdr)); if (NS_SUCCEEDED(rv) && mailHdr) { - messages->AppendElement(mailHdr, false); + messages->AppendElement(mailHdr); bool isRead = false; mailHdr->GetIsRead(&isRead); if (!isRead) numNewMessages++; } } uint32_t destFlags; destFolder->GetFlags(&destFlags); diff --git a/mailnews/base/util/nsMsgDBFolder.cpp b/mailnews/base/util/nsMsgDBFolder.cpp --- a/mailnews/base/util/nsMsgDBFolder.cpp +++ b/mailnews/base/util/nsMsgDBFolder.cpp @@ -1860,31 +1860,31 @@ nsresult nsMsgDBFolder::HandleAutoCompac { nsCOMPtr folder = do_QueryElementAt(allDescendents, i); expungedBytes = 0; folder->GetFlags(&flags); if (flags & nsMsgFolderFlags::Offline) folder->GetExpungedBytes(&expungedBytes); if (expungedBytes > 0 ) { - offlineFolderArray->AppendElement(folder, false); + offlineFolderArray->AppendElement(folder); offlineExpungedBytes += expungedBytes; } } } else //pop or local { for (uint32_t i = 0; i < cnt; i++) { nsCOMPtr folder = do_QueryElementAt(allDescendents, i); expungedBytes = 0; folder->GetExpungedBytes(&expungedBytes); if (expungedBytes > 0 ) { - folderArray->AppendElement(folder, false); + folderArray->AppendElement(folder); localExpungedBytes += expungedBytes; } } } } } while (++serverIndex < numServers); totalExpungedBytes = localExpungedBytes + offlineExpungedBytes; @@ -2347,17 +2347,17 @@ nsMsgDBFolder::OnMessageClassified(const // a filter moved it. rv = mDatabase->ContainsKey(msgKey, &hasKey); if (!NS_SUCCEEDED(rv) || !hasKey) continue; nsCOMPtr msgHdr; rv = mDatabase->GetMsgHdrForKey(msgKey, getter_AddRefs(msgHdr)); if (!NS_SUCCEEDED(rv)) continue; - classifiedMsgHdrs->AppendElement(msgHdr, false); + classifiedMsgHdrs->AppendElement(msgHdr); } // only generate the notification if there are some classified messages if (NS_SUCCEEDED(classifiedMsgHdrs->GetLength(&length)) && length) notifier->NotifyMsgsClassified(classifiedMsgHdrs, mBayesJunkClassifying, mBayesTraitClassifying); mClassifiedMsgKeys.Clear(); @@ -2722,17 +2722,17 @@ nsMsgDBFolder::CallFilterPlugins(nsIMsgW { // Don't do filters on this message again. // (Only set this if we are actually filtering since this is // tantamount to a memory leak.) OrProcessingFlags(msgKey, nsMsgProcessingFlags::FiltersDone); // Lazily create the array. if (!mPostBayesMessagesToFilter) mPostBayesMessagesToFilter = do_CreateInstance(NS_ARRAY_CONTRACTID); - mPostBayesMessagesToFilter->AppendElement(msgHdr, false); + mPostBayesMessagesToFilter->AppendElement(msgHdr); } } } NotifyHdrsNotBeingClassified(); // If there weren't any new messages, just return. if (newMessageKeys.IsEmpty()) return NS_OK; @@ -4425,17 +4425,17 @@ NS_IMETHODIMP nsMsgDBFolder::GetFoldersW NS_ADDREF(*aResult = array); return NS_OK; } NS_IMETHODIMP nsMsgDBFolder::ListFoldersWithFlags(uint32_t aFlags, nsIMutableArray* aFolders) { NS_ENSURE_ARG_POINTER(aFolders); if ((mFlags & aFlags) == aFlags) - aFolders->AppendElement(static_cast(this), false); + aFolders->AppendElement(static_cast(this)); nsCOMPtr dummy; GetSubFolders(getter_AddRefs(dummy)); // initialize mSubFolders int32_t count = mSubFolders.Count(); for (int32_t i = 0; i < count; ++i) mSubFolders[i]->ListFoldersWithFlags(aFlags, aFolders); @@ -5117,17 +5117,17 @@ NS_IMETHODIMP nsMsgDBFolder::ListDescend NS_ENSURE_ARG_POINTER(aDescendants); nsCOMPtr dummy; GetSubFolders(getter_AddRefs(dummy)); // initialize mSubFolders uint32_t count = mSubFolders.Count(); for (uint32_t i = 0; i < count; i++) { nsCOMPtr child(mSubFolders[i]); - aDescendants->AppendElement(child, false); + aDescendants->AppendElement(child); child->ListDescendants(aDescendants); // recurse } return NS_OK; } NS_IMETHODIMP nsMsgDBFolder::GetBaseMessageURI(nsACString& baseMessageURI) { if (mBaseMessageURI.IsEmpty()) @@ -5949,17 +5949,17 @@ nsresult nsMsgDBFolder::MessagesInKeyOrd rv = srcFolder->GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db)); if (NS_SUCCEEDED(rv) && db) { for (uint32_t i = 0; i < numMessages; i++) { rv = db->GetMsgHdrForKey(aKeyArray[i], getter_AddRefs(msgHdr)); NS_ENSURE_SUCCESS(rv,rv); if (msgHdr) - messages->AppendElement(msgHdr, false); + messages->AppendElement(msgHdr); } } return rv; } /* static */ nsMsgKeySetU* nsMsgKeySetU::Create() { nsMsgKeySetU* set = new nsMsgKeySetU; diff --git a/mailnews/base/util/nsMsgIncomingServer.cpp b/mailnews/base/util/nsMsgIncomingServer.cpp --- a/mailnews/base/util/nsMsgIncomingServer.cpp +++ b/mailnews/base/util/nsMsgIncomingServer.cpp @@ -1913,17 +1913,17 @@ nsMsgIncomingServer::ConfigureTemporaryS nsCOMPtr searchValue; searchTerm->GetValue(getter_AddRefs(searchValue)); NS_ENSURE_SUCCESS(rv, rv); searchValue->SetAttrib(nsMsgSearchAttrib::JunkScoreOrigin); searchValue->SetStr(NS_LITERAL_STRING("user")); searchTerm->SetValue(searchValue); - searchTerms->InsertElementAt(searchTerm, count, /* weak = */ false); + searchTerms->InsertElementAt(searchTerm, count); bool moveOnSpam, markAsReadOnSpam; spamSettings->GetMoveOnSpam(&moveOnSpam); if (moveOnSpam) { nsCString spamFolderURI; rv = spamSettings->GetSpamFolderURI(getter_Copies(spamFolderURI)); if (NS_SUCCEEDED(rv) && (!spamFolderURI.IsEmpty())) diff --git a/mailnews/base/util/nsMsgReadStateTxn.cpp b/mailnews/base/util/nsMsgReadStateTxn.cpp --- a/mailnews/base/util/nsMsgReadStateTxn.cpp +++ b/mailnews/base/util/nsMsgReadStateTxn.cpp @@ -52,15 +52,15 @@ nsMsgReadStateTxn::MarkMessages(bool aAs NS_ENSURE_SUCCESS(rv, rv); uint32_t length = mMarkedMessages.Length(); for (uint32_t i = 0; i < length; i++) { nsCOMPtr curMsgHdr; rv = mParentFolder->GetMessageHeader(mMarkedMessages[i], getter_AddRefs(curMsgHdr)); if (NS_SUCCEEDED(rv) && curMsgHdr) { - messageArray->AppendElement(curMsgHdr, false); + messageArray->AppendElement(curMsgHdr); } } return mParentFolder->MarkMessagesRead(messageArray, aAsRead); } diff --git a/mailnews/base/util/nsMsgUtils.cpp b/mailnews/base/util/nsMsgUtils.cpp --- a/mailnews/base/util/nsMsgUtils.cpp +++ b/mailnews/base/util/nsMsgUtils.cpp @@ -1647,17 +1647,17 @@ NS_MSG_BASE nsresult MsgGetHeadersFromKe // This function silently skips when the key is not found. This is an expected case. if (hasKey) { nsCOMPtr msgHdr; rv = aDB->GetMsgHdrForKey(key, getter_AddRefs(msgHdr)); NS_ENSURE_SUCCESS(rv, rv); - aHeaders->AppendElement(msgHdr, false); + aHeaders->AppendElement(msgHdr); } } return rv; } NS_MSG_BASE nsresult MsgGetHdrsFromKeys(nsIMsgDatabase *aDB, nsMsgKey *aMsgKeys, uint32_t aNumKeys, nsIMutableArray **aHeaders) @@ -1675,17 +1675,17 @@ NS_MSG_BASE nsresult MsgGetHdrsFromKeys( bool hasKey; rv = aDB->ContainsKey(key, &hasKey); // This function silently skips when the key is not found. This is an expected case. if (NS_SUCCEEDED(rv) && hasKey) { nsCOMPtr msgHdr; rv = aDB->GetMsgHdrForKey(key, getter_AddRefs(msgHdr)); if (NS_SUCCEEDED(rv)) - messages->AppendElement(msgHdr, false); + messages->AppendElement(msgHdr); } } messages.forget(aHeaders); return NS_OK; } bool MsgAdvanceToNextLine(const char *buffer, uint32_t &bufferOffset, uint32_t maxBufferOffset) diff --git a/mailnews/compose/src/nsMsgCompose.cpp b/mailnews/compose/src/nsMsgCompose.cpp --- a/mailnews/compose/src/nsMsgCompose.cpp +++ b/mailnews/compose/src/nsMsgCompose.cpp @@ -3932,17 +3932,17 @@ nsMsgComposeSendListener::RemoveCurrentD if (!containsKey) break; // Build the msg array. nsCOMPtr messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ASSERTION(NS_SUCCEEDED(rv), "RemoveCurrentDraftMessage can't allocate array."); if (NS_FAILED(rv) || !messageArray) break; - rv = messageArray->AppendElement(msgDBHdr, false); + rv = messageArray->AppendElement(msgDBHdr); NS_ASSERTION(NS_SUCCEEDED(rv), "RemoveCurrentDraftMessage can't append msg header to array."); if (NS_FAILED(rv)) break; // Ready to delete the msg. rv = msgFolder->DeleteMessages(messageArray, nullptr, true, false, nullptr, false /*allowUndo*/); NS_ASSERTION(NS_SUCCEEDED(rv), "RemoveCurrentDraftMessage can't delete message."); } while(false); diff --git a/mailnews/compose/src/nsMsgSend.cpp b/mailnews/compose/src/nsMsgSend.cpp --- a/mailnews/compose/src/nsMsgSend.cpp +++ b/mailnews/compose/src/nsMsgSend.cpp @@ -3995,17 +3995,17 @@ nsMsgComposeAndSend::FilterSentMessage() nsCOMPtr msgArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); if (NS_FAILED(rv)) return rv; nsCOMPtr filterSvc = do_GetService(NS_MSGFILTERSERVICE_CONTRACTID, &rv); if (NS_FAILED(rv)) return rv; - rv = msgArray->AppendElement(msgHdr, false); + rv = msgArray->AppendElement(msgHdr); if (NS_FAILED(rv)) return rv; nsCOMPtr msgWindow; if (mSendProgress) mSendProgress->GetMsgWindow(getter_AddRefs(msgWindow)); return filterSvc->ApplyFilters(nsMsgFilterType::PostOutgoing, msgArray, folder, msgWindow, this); diff --git a/mailnews/compose/src/nsMsgSendLater.cpp b/mailnews/compose/src/nsMsgSendLater.cpp --- a/mailnews/compose/src/nsMsgSendLater.cpp +++ b/mailnews/compose/src/nsMsgSendLater.cpp @@ -889,17 +889,17 @@ nsMsgSendLater::DeleteCurrentMessage() // Get the composition fields interface nsCOMPtr msgArray(do_CreateInstance(NS_ARRAY_CONTRACTID)); if (!msgArray) return NS_ERROR_FACTORY_NOT_LOADED; if (!mMessageFolder) return NS_ERROR_UNEXPECTED; - msgArray->InsertElementAt(mMessage, 0, false); + msgArray->InsertElementAt(mMessage, 0); nsresult res = mMessageFolder->DeleteMessages(msgArray, nullptr, true, false, nullptr, false /*allowUndo*/); if (NS_FAILED(res)) return NS_ERROR_FAILURE; // Null out the message so we don't try and delete it again. mMessage = nullptr; diff --git a/mailnews/db/msgdb/src/nsMsgDatabase.cpp b/mailnews/db/msgdb/src/nsMsgDatabase.cpp --- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp +++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp @@ -464,17 +464,17 @@ NS_IMETHODIMP nsMsgDBService::ForceFolde NS_IMETHODIMP nsMsgDBService::GetOpenDBs(nsIArray **aOpenDBs) { NS_ENSURE_ARG_POINTER(aOpenDBs); nsresult rv; nsCOMPtr openDBs(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); for (uint32_t i = 0; i < m_dbCache.Length(); i++) - openDBs->AppendElement(m_dbCache[i], false); + openDBs->AppendElement(m_dbCache[i]); openDBs.forget(aOpenDBs); return NS_OK; } static bool gGotGlobalPrefs = false; static bool gThreadWithoutRe = true; static bool gStrictThreading = false; @@ -3081,17 +3081,17 @@ nsMsgDatabase::NextMatchingHdrs(nsISimpl do { nsCOMPtr supports; rv = enumerator->GetNext(getter_AddRefs(supports)); nsCOMPtr nextMessage = do_QueryInterface(supports); if (NS_SUCCEEDED(rv) && nextMessage) { if (aMatchingHdrs) - aMatchingHdrs->AppendElement(nextMessage, false); + aMatchingHdrs->AppendElement(nextMessage); ++numMatches; if (aMaxResults && numMatches == aMaxResults) break; } else break; } while (true); @@ -5341,17 +5341,17 @@ nsresult nsMsgDatabase::PurgeMessagesOld purgeHdr = true; } if (purgeHdr) { nsMsgKey msgKey; pHeader->GetMessageKey(&msgKey); keysToDelete.AppendElement(msgKey); if (hdrsToDelete) - hdrsToDelete->AppendElement(pHeader, false); + hdrsToDelete->AppendElement(pHeader); } NS_RELEASE(pHeader); } if (!hdrsToDelete) { DeleteMessages(keysToDelete.Length(), keysToDelete.Elements(), nullptr); @@ -5404,17 +5404,17 @@ nsresult nsMsgDatabase::PurgeExcessMessa if (purgeHdr) { nsMsgKey msgKey; pHeader->GetMessageKey(&msgKey); keysToDelete.AppendElement(msgKey); numHdrs--; if (hdrsToDelete) - hdrsToDelete->AppendElement(pHeader, false); + hdrsToDelete->AppendElement(pHeader); } NS_RELEASE(pHeader); } if (!hdrsToDelete) { int32_t numKeysToDelete = keysToDelete.Length(); if (numKeysToDelete > 0) diff --git a/mailnews/extensions/mailviews/src/nsMsgMailViewList.cpp b/mailnews/extensions/mailviews/src/nsMsgMailViewList.cpp --- a/mailnews/extensions/mailviews/src/nsMsgMailViewList.cpp +++ b/mailnews/extensions/mailviews/src/nsMsgMailViewList.cpp @@ -108,17 +108,17 @@ NS_IMETHODIMP nsMsgMailView::SetSearchTe mViewSearchTerms = aSearchTerms; return NS_OK; } NS_IMETHODIMP nsMsgMailView::AppendTerm(nsIMsgSearchTerm *aTerm) { NS_ENSURE_TRUE(aTerm, NS_ERROR_NULL_POINTER); - return mViewSearchTerms->AppendElement(aTerm, /* weak */ false); + return mViewSearchTerms->AppendElement(aTerm); } NS_IMETHODIMP nsMsgMailView::CreateTerm(nsIMsgSearchTerm **aResult) { NS_ENSURE_ARG_POINTER(aResult); nsCOMPtr searchTerm = do_CreateInstance("@mozilla.org/messenger/searchTerm;1"); searchTerm.forget(aResult); return NS_OK; diff --git a/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp b/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp --- a/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp +++ b/mailnews/extensions/smime/src/nsMsgComposeSecure.cpp @@ -982,21 +982,21 @@ nsresult nsMsgComposeSecure::MimeCryptoH */ bool isSame; if (NS_SUCCEEDED(cert->Equals(mSelfEncryptionCert, &isSame)) && isSame) { already_added_self_cert = true; } - mCerts->AppendElement(cert, false); + mCerts->AppendElement(cert); } if (!already_added_self_cert) { - mCerts->AppendElement(mSelfEncryptionCert, false); + mCerts->AppendElement(mSelfEncryptionCert); } } return res; } NS_IMETHODIMP nsMsgComposeSecure::MimeCryptoWriteBlock (const char *buf, int32_t size) { int status = 0; diff --git a/mailnews/imap/src/nsAutoSyncState.cpp b/mailnews/imap/src/nsAutoSyncState.cpp --- a/mailnews/imap/src/nsAutoSyncState.cpp +++ b/mailnews/imap/src/nsAutoSyncState.cpp @@ -293,24 +293,24 @@ NS_IMETHODIMP nsAutoSyncState::GetNextGr // ignore 0 byte messages; the imap parser asserts when we try // to download them, and there's no point anyway. if (!msgSize) continue; if (!*aActualGroupSize && msgSize >= aSuggestedGroupSizeLimit) { *aActualGroupSize = msgSize; - group->AppendElement(qhdr, false); + group->AppendElement(qhdr); idx++; break; } if ((*aActualGroupSize) + msgSize > aSuggestedGroupSizeLimit) break; - group->AppendElement(qhdr, false); + group->AppendElement(qhdr); *aActualGroupSize += msgSize; }// endfor mLastOffset = mOffset; mOffset = idx; } LogOwnerFolderName("Next group of messages to be downloaded."); diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -1036,17 +1036,17 @@ NS_IMETHODIMP nsImapMailFolder::List() NS_IMETHODIMP nsImapMailFolder::RemoveSubFolder (nsIMsgFolder *which) { nsresult rv; nsCOMPtr folders(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_TRUE(folders, rv); nsCOMPtr folderSupport = do_QueryInterface(which, &rv); NS_ENSURE_SUCCESS(rv, rv); - folders->AppendElement(folderSupport, false); + folders->AppendElement(folderSupport); rv = nsMsgDBFolder::DeleteSubFolders(folders, nullptr); which->Delete(); return rv; } NS_IMETHODIMP nsImapMailFolder::CreateStorageIfMissing(nsIUrlListener* urlListener) { nsresult rv = NS_OK; @@ -1398,19 +1398,19 @@ NS_IMETHODIMP nsImapMailFolder::CompactA for (uint32_t i = 0; i < cnt; i++) { nsCOMPtr folder = do_QueryElementAt(allDescendents, i, &rv); NS_ENSURE_SUCCESS(rv, rv); uint32_t folderFlags; folder->GetFlags(&folderFlags); if (! (folderFlags & (nsMsgFolderFlags::Virtual | nsMsgFolderFlags::ImapNoselect))) { - rv = folderArray->AppendElement(folder, false); + rv = folderArray->AppendElement(folder); if (aCompactOfflineAlso) - offlineFolderArray->AppendElement(folder, false); + offlineFolderArray->AppendElement(folder); } } rv = folderArray->GetLength(&cnt); NS_ENSURE_SUCCESS(rv, rv); if (cnt == 0) return NotifyCompactCompleted(); } nsCOMPtr folderCompactor = @@ -2376,17 +2376,17 @@ nsImapMailFolder::DeleteSubFolders(nsIAr if (folderFlags & nsMsgFolderFlags::Virtual) { RemoveSubFolder(curFolder); // since the folder pane only allows single selection, we can do this deleteNoTrash = confirmed = true; confirmDeletion = false; } else - foldersRemaining->InsertElementAt(curFolder, 0, false); + foldersRemaining->InsertElementAt(curFolder, 0); } } foldersRemaining->GetLength(&folderCount); nsCOMPtr imapService = do_GetService(NS_IMAPSERVICE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); if (!deleteNoTrash) @@ -3567,17 +3567,17 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFil if (msgFlags & nsMsgMessageFlags::MDNReportNeeded && !isRead) { mDatabase->MarkMDNNeeded(msgKey, false, nullptr); mDatabase->MarkMDNSent(msgKey, true, nullptr); } nsCOMPtr messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_TRUE(messageArray, rv); - messageArray->AppendElement(msgHdr, false); + messageArray->AppendElement(msgHdr); nsCOMPtr dstFolder; rv = GetExistingFolder(actionTargetFolderUri, getter_AddRefs(dstFolder)); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); @@ -3662,17 +3662,17 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFil } break; case nsMsgFilterAction::AddTag: { nsCString keyword; filterAction->GetStrValue(keyword); nsCOMPtr messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_TRUE(messageArray, rv); - messageArray->AppendElement(msgHdr, false); + messageArray->AppendElement(msgHdr); AddKeywordsToMessages(messageArray, keyword); break; } case nsMsgFilterAction::JunkScore: { nsAutoCString junkScoreStr; int32_t junkScore; filterAction->GetJunkScore(&junkScore); @@ -3772,17 +3772,17 @@ NS_IMETHODIMP nsImapMailFolder::ApplyFil NS_ENSURE_SUCCESS(rv, rv); nsAutoCString value; filterAction->GetStrValue(value); nsCOMPtr messageArray( do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_TRUE(messageArray, rv); - messageArray->AppendElement(msgHdr, false); + messageArray->AppendElement(msgHdr); customAction->Apply(messageArray, value, nullptr, nsMsgFilterType::InboxRule, msgWindow); // allow custom action to affect new msgHdr->GetFlags(&msgFlags); if (!(msgFlags & nsMsgMessageFlags::New)) msgIsNew = false; } @@ -3870,17 +3870,17 @@ nsImapMailFolder::ReplayOfflineMoveCopy( for (uint32_t msgIndex = 0; msgIndex < aNumKeys; msgIndex++) { if (srcMessageKey == aMsgKeys[msgIndex]) { nsCOMPtr fakeDestHdr; dstFolderDB->GetMsgHdrForKey(offlineOps[opIndex], getter_AddRefs(fakeDestHdr)); if (fakeDestHdr) - messages->AppendElement(fakeDestHdr, false); + messages->AppendElement(fakeDestHdr); break; } } } } } destImapFolder->SetPendingAttributes(messages, isMove); } @@ -7281,17 +7281,17 @@ nsresult nsImapMailFolder::CopyMessagesO NS_ASSERTION(false, "failed to copy hdr"); stopit = rv; } if (NS_SUCCEEDED(stopit)) { bool hasMsgOffline = false; - destMsgHdrs->AppendElement(newMailHdr, false); + destMsgHdrs->AppendElement(newMailHdr); srcFolder->HasMsgOffline(originalKey, &hasMsgOffline); newMailHdr->SetUint32Property("pseudoHdr", 1); if (!reusable) (void)srcFolder->GetMsgInputStream(newMailHdr, &reusable, getter_AddRefs(inputStream)); if (inputStream && hasMsgOffline && !isLocked) { @@ -7336,17 +7336,17 @@ nsresult nsImapMailFolder::CopyMessagesO { if (deleteToTrash || deleteImmediately) keysToDelete.AppendElement(msgKey); else sourceMailDB->MarkImapDeleted(msgKey, true, nullptr); // offline delete } if (successfulCopy) // This is for both moves and copies - msgHdrsCopied->AppendElement(mailHdr, false); + msgHdrsCopied->AppendElement(mailHdr); } } EnableNotifications(nsIMsgFolder::allMessageCountNotifications, true); RefPtr addHdrMsgTxn = new nsImapOfflineTxn(this, &addedKeys, nullptr, this, isMove, nsIMsgOfflineImapOperation::kAddedHeader, addedHdrs); if (addHdrMsgTxn && txnMgr) txnMgr->DoTransaction(addHdrMsgTxn); @@ -7871,17 +7871,17 @@ nsImapFolderCopyState::OnStopRunningUrl( if (!hasMore) return AdvanceToNextFolder(NS_OK); while (NS_SUCCEEDED(rv) && hasMore) { rv = enumerator->GetNext(getter_AddRefs(item)); NS_ENSURE_SUCCESS(rv, rv); - rv = msgArray->AppendElement(item, false); + rv = msgArray->AppendElement(item); NS_ENSURE_SUCCESS(rv, rv); rv = enumerator->HasMoreElements(&hasMore); } nsCOMPtr copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); rv = copyService->CopyMessages(m_curSrcFolder, msgArray, newMsgFolder, @@ -8097,17 +8097,17 @@ nsImapMailFolder::CopyFileMessage(nsIFil { messageId.AppendInt((int32_t) key); // Perhaps we have the message offline, but even if we do it is // not valid, since the only time we do a file copy for an // existing message is when we are changing the message. // So set the offline size to 0 to force SetPendingAttributes to // clear the offline message flag. msgToReplace->SetOfflineMessageSize(0); - messages->AppendElement(msgToReplace, false); + messages->AppendElement(msgToReplace); SetPendingAttributes(messages, false); } } bool isMove = (msgToReplace ? true : false); rv = InitCopyState(srcSupport, messages, isMove, isDraftOrTemplate, false, aNewMsgFlags, aNewMsgKeywords, listener, msgWindow, false); @@ -8436,17 +8436,17 @@ nsImapMailFolder::CopyFileToOfflineStore nsCOMPtr msgStore; GetMsgStore(getter_AddRefs(msgStore)); if (msgStore) msgStore->FinishNewMessage(offlineStore, fakeHdr); } nsCOMPtr messages(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); - messages->AppendElement(fakeHdr, false); + messages->AppendElement(fakeHdr); SetPendingAttributes(messages, false); // Gloda needs this notification to index the fake message. nsCOMPtr notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID)); if (notifier) notifier->NotifyMsgsClassified(messages, false, false); inputStream->Close(); @@ -9146,17 +9146,17 @@ nsImapMailFolder::OnMessageClassified(co (void)spamSettings->GetMarkAsReadOnSpam(&markAsReadOnSpam); if (markAsReadOnSpam) { if (!m_junkMessagesToMarkAsRead) { m_junkMessagesToMarkAsRead = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); } - m_junkMessagesToMarkAsRead->AppendElement(msgHdr, false); + m_junkMessagesToMarkAsRead->AppendElement(msgHdr); } bool willMoveMessage = false; // don't do the move when we are opening up // the junk mail folder or the trash folder // or when manually classifying messages in those folders if (!(mFlags & nsMsgFolderFlags::Junk || mFlags & nsMsgFolderFlags::Trash)) diff --git a/mailnews/imap/src/nsImapOfflineSync.cpp b/mailnews/imap/src/nsImapOfflineSync.cpp --- a/mailnews/imap/src/nsImapOfflineSync.cpp +++ b/mailnews/imap/src/nsImapOfflineSync.cpp @@ -600,17 +600,17 @@ void nsImapOfflineSync::ProcessMoveOpera op->GetNewFlags(&newImapFlags); // first three bits are the same msgFlags |= (newImapFlags & 0x07); if (newImapFlags & kImapMsgForwardedFlag) msgFlags |= nsMsgMessageFlags::Forwarded; mailHdr->SetFlags(msgFlags); mailHdr->SetMessageSize(msgSize); } - messages->AppendElement(mailHdr, false); + messages->AppendElement(mailHdr); } } nsCOMPtr copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv); if (copyService) copyService->CopyMessages(m_currentFolder, messages, destFolder, true, this, m_window, false); } } } @@ -695,17 +695,17 @@ void nsImapOfflineSync::ProcessCopyOpera nsCOMPtr messages(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); if (messages && NS_SUCCEEDED(rv)) { for (uint32_t keyIndex = 0; keyIndex < matchingFlagKeys.Length(); keyIndex++) { nsCOMPtr mailHdr = nullptr; rv = m_currentFolder->GetMessageHeader(matchingFlagKeys.ElementAt(keyIndex), getter_AddRefs(mailHdr)); if (NS_SUCCEEDED(rv) && mailHdr) - messages->AppendElement(mailHdr, false); + messages->AppendElement(mailHdr); } nsCOMPtr copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv); if (copyService) copyService->CopyMessages(m_currentFolder, messages, destFolder, false, this, m_window, false); } } } diff --git a/mailnews/import/applemail/src/nsAppleMailImport.cpp b/mailnews/import/applemail/src/nsAppleMailImport.cpp --- a/mailnews/import/applemail/src/nsAppleMailImport.cpp +++ b/mailnews/import/applemail/src/nsAppleMailImport.cpp @@ -283,17 +283,17 @@ void nsAppleMailImportMail::FindAccountM nsCOMPtr mailboxDescFile; rv = desc->GetFile(getter_AddRefs(mailboxDescFile)); if (!mailboxDescFile) continue; mailboxDescFile->InitWithFile(currentEntry); // add this mailbox descriptor to the list - aMailboxDescs->AppendElement(desc, false); + aMailboxDescs->AppendElement(desc); // now add all the children mailboxes mCurDepth++; FindMboxDirs(currentEntry, aMailboxDescs, aImportService); mCurDepth--; } } } @@ -360,17 +360,17 @@ nsresult nsAppleMailImportMail::AddMboxD nsCOMPtr mailboxDescFile; rv = desc->GetFile(getter_AddRefs(mailboxDescFile)); NS_ENSURE_SUCCESS(rv, rv); if (mailboxDescFile) mailboxDescFile->InitWithFile(aFolder); // add this mailbox descriptor to the list - aMailboxDescs->AppendElement(desc, false); + aMailboxDescs->AppendElement(desc); } return NS_OK; } // Starts looking for .mbox dirs in the specified dir. The .mbox dirs contain messages and can be considered leafs in a tree of // nested mailboxes (subfolders). // diff --git a/mailnews/import/becky/src/nsBeckyAddressBooks.cpp b/mailnews/import/becky/src/nsBeckyAddressBooks.cpp --- a/mailnews/import/becky/src/nsBeckyAddressBooks.cpp +++ b/mailnews/import/becky/src/nsBeckyAddressBooks.cpp @@ -235,17 +235,17 @@ nsBeckyAddressBooks::AppendAddressBookDe uint32_t size = CountAddressBookSize(aEntry); descriptor->SetSize(size); descriptor->SetAbFile(aEntry); nsAutoString name; aEntry->GetLeafName(name); descriptor->SetPreferredName(name); - return aCollected->AppendElement(descriptor, false); + return aCollected->AppendElement(descriptor); } nsresult nsBeckyAddressBooks::CollectAddressBooks(nsIFile *aTarget, nsIMutableArray *aCollected) { nsresult rv = AppendAddressBookDescriptor(aTarget, aCollected); NS_ENSURE_SUCCESS(rv, rv); diff --git a/mailnews/import/becky/src/nsBeckyMail.cpp b/mailnews/import/becky/src/nsBeckyMail.cpp --- a/mailnews/import/becky/src/nsBeckyMail.cpp +++ b/mailnews/import/becky/src/nsBeckyMail.cpp @@ -139,17 +139,17 @@ nsBeckyMail::AppendMailboxDescriptor(nsI nsCOMPtr mailboxFile; rv = descriptor->GetFile(getter_AddRefs(mailboxFile)); NS_ENSURE_SUCCESS(rv, rv); descriptor->SetDepth(aDepth); mailboxFile->InitWithFile(aEntry); - aCollected->AppendElement(descriptor, false); + aCollected->AppendElement(descriptor); return NS_OK; } nsresult nsBeckyMail::CollectMailboxesInFolderListFile(nsIFile *aListFile, uint32_t aDepth, nsIMutableArray *aCollected) diff --git a/mailnews/import/outlook/src/MapiMessage.cpp b/mailnews/import/outlook/src/MapiMessage.cpp --- a/mailnews/import/outlook/src/MapiMessage.cpp +++ b/mailnews/import/outlook/src/MapiMessage.cpp @@ -1175,17 +1175,17 @@ nsresult CMapiMessage::GetAttachments(ns it != m_stdattachments.end(); it++) { nsCOMPtr a(do_CreateInstance(NS_MSGATTACHEDFILE_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); a->SetOrigUrl((*it)->orig_url); a->SetTmpFile((*it)->tmp_file); a->SetEncoding(nsDependentCString((*it)->encoding)); a->SetRealName(nsDependentCString((*it)->real_name)); a->SetType(nsDependentCString((*it)->type)); - attachments->AppendElement(a, false); + attachments->AppendElement(a); } return rv; } bool CMapiMessage::GetEmbeddedAttachmentInfo(unsigned int i, nsIURI **uri, const char **cid, const char **name) const { diff --git a/mailnews/import/outlook/src/nsOutlookCompose.cpp b/mailnews/import/outlook/src/nsOutlookCompose.cpp --- a/mailnews/import/outlook/src/nsOutlookCompose.cpp +++ b/mailnews/import/outlook/src/nsOutlookCompose.cpp @@ -304,17 +304,17 @@ nsresult nsOutlookCompose::ComposeTheMes if (msg.GetEmbeddedAttachmentInfo(i, &uri, &cid, &name)) { if (!embeddedObjects) { embeddedObjects = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); } nsCOMPtr imageData = new nsImportEmbeddedImageData(uri, nsDependentCString(cid), nsDependentCString(name)); - embeddedObjects->AppendElement(imageData, false); + embeddedObjects->AppendElement(imageData); } } } nsCString bodyA; nsMsgI18NConvertFromUnicode(nsDependentCString(msg.GetBodyCharset()), bodyW, bodyA); nsCOMPtr impService(do_GetService(NS_IMPORTSERVICE_CONTRACTID, &rv)); diff --git a/mailnews/import/outlook/src/nsOutlookMail.cpp b/mailnews/import/outlook/src/nsOutlookMail.cpp --- a/mailnews/import/outlook/src/nsOutlookMail.cpp +++ b/mailnews/import/outlook/src/nsOutlookMail.cpp @@ -172,17 +172,17 @@ nsresult nsOutlookMail::GetMailFolders(n pID->SetDepth(pFolder->GetDepth()); pID->SetIdentifier(i); pFolder->GetDisplayName(name); pID->SetDisplayName(name.get()); pID->SetSize(1000); rv = pID->QueryInterface(kISupportsIID, (void **) &pInterface); - array->AppendElement(pInterface, false); + array->AppendElement(pInterface); pInterface->Release(); pID->Release(); } } array.forget(pArray); return NS_OK; } @@ -274,17 +274,17 @@ nsresult nsOutlookMail::GetAddressBooks( rv = impSvc->CreateNewABDescriptor(&pID); if (NS_SUCCEEDED(rv)) { pID->SetIdentifier(i); pFolder->GetDisplayName(name); MakeAddressBookNameUnique(name, list); pID->SetPreferredName(name); pID->SetSize(100); rv = pID->QueryInterface(kISupportsIID, (void **) &pInterface); - array->AppendElement(pInterface, false); + array->AppendElement(pInterface); pInterface->Release(); pID->Release(); } } } array.forget(pArray); return NS_OK; } diff --git a/mailnews/import/text/src/nsTextImport.cpp b/mailnews/import/text/src/nsTextImport.cpp --- a/mailnews/import/text/src/nsTextImport.cpp +++ b/mailnews/import/text/src/nsTextImport.cpp @@ -311,17 +311,17 @@ NS_IMETHODIMP ImportAddressImpl::FindAdd rv = impSvc->CreateNewABDescriptor(getter_AddRefs(desc)); if (NS_SUCCEEDED(rv)) { int64_t sz = 0; pLoc->GetFileSize(&sz); desc->SetPreferredName(name); desc->SetSize((uint32_t) sz); desc->SetAbFile(m_fileLoc); rv = desc->QueryInterface(kISupportsIID, (void **) &pInterface); - array->AppendElement(pInterface, false); + array->AppendElement(pInterface); pInterface->Release(); } if (NS_FAILED(rv)) { IMPORT_LOG0("*** Error creating address book descriptor for text import\n"); return rv; } array.forget(ppArray); return NS_OK; diff --git a/mailnews/import/vcard/src/nsVCardImport.cpp b/mailnews/import/vcard/src/nsVCardImport.cpp --- a/mailnews/import/vcard/src/nsVCardImport.cpp +++ b/mailnews/import/vcard/src/nsVCardImport.cpp @@ -267,17 +267,17 @@ NS_IMETHODIMP ImportVCardAddressImpl::Fi rv = impSvc->CreateNewABDescriptor(getter_AddRefs(desc)); if (NS_SUCCEEDED(rv)) { int64_t sz = 0; pLoc->GetFileSize(&sz); desc->SetPreferredName(name); desc->SetSize((uint32_t) sz); desc->SetAbFile(m_fileLoc); nsCOMPtr pInterface(do_QueryInterface(desc, &rv)); - array->AppendElement(pInterface, false); + array->AppendElement(pInterface); } if (NS_FAILED(rv)) { IMPORT_LOG0( "*** Error creating address book descriptor for vCard import\n"); return rv; } array.forget(ppArray); diff --git a/mailnews/local/src/nsLocalMailFolder.cpp b/mailnews/local/src/nsLocalMailFolder.cpp --- a/mailnews/local/src/nsLocalMailFolder.cpp +++ b/mailnews/local/src/nsLocalMailFolder.cpp @@ -614,17 +614,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::Comp expungedBytes = 0; if (folder) rv = folder->GetExpungedBytes(&expungedBytes); NS_ENSURE_SUCCESS(rv, rv); if (expungedBytes > 0) - rv = folderArray->AppendElement(folder, false); + rv = folderArray->AppendElement(folder); } rv = folderArray->GetLength(&cnt); NS_ENSURE_SUCCESS(rv,rv); if (cnt == 0) return NotifyCompactCompleted(); } nsCOMPtr folderCompactor = do_CreateInstance(NS_MSGLOCALFOLDERCOMPACTOR_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); @@ -1273,17 +1273,17 @@ nsMsgLocalMailFolder::AddMessageDisposit nsresult rv = nsMsgDBFolder::AddMessageDispositionState(aMessage, aDispositionFlag); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr msgStore; rv = GetMsgStore(getter_AddRefs(msgStore)); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr messages(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_SUCCESS(rv, rv); - messages->AppendElement(aMessage, false); + messages->AppendElement(aMessage); return msgStore->ChangeFlags(messages, msgFlag, true); } NS_IMETHODIMP nsMsgLocalMailFolder::MarkMessagesRead(nsIArray *aMessages, bool aMarkRead) { nsresult rv = nsMsgDBFolder::MarkMessagesRead(aMessages, aMarkRead); NS_ENSURE_SUCCESS(rv, rv); @@ -1462,17 +1462,17 @@ nsMsgLocalMailFolder::OnCopyCompleted(ns if (NS_SUCCEEDED(rv) && haveSemaphore) ReleaseSemaphore(static_cast(this)); if (mCopyState && !mCopyState->m_newMsgKeywords.IsEmpty() && mCopyState->m_newHdr) { nsCOMPtr messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_TRUE(messageArray, rv); - messageArray->AppendElement(mCopyState->m_newHdr, false); + messageArray->AppendElement(mCopyState->m_newHdr); AddKeywordsToMessages(messageArray, mCopyState->m_newMsgKeywords); } if (moveCopySucceeded && mDatabase) { mDatabase->SetSummaryValid(true); (void) CloseDBIfFolderNotOpen(); } @@ -1743,17 +1743,17 @@ nsMsgLocalMailFolder::CopyFolderAcrossSe if (messages) rv = messages->HasMoreElements(&hasMoreElements); while (NS_SUCCEEDED(rv) && hasMoreElements) { rv = messages->GetNext(getter_AddRefs(aSupport)); NS_ENSURE_SUCCESS(rv, rv); - rv = msgArray->AppendElement(aSupport, false); + rv = msgArray->AppendElement(aSupport); NS_ENSURE_SUCCESS(rv, rv); rv = messages->HasMoreElements(&hasMoreElements); } uint32_t numMsgs=0; msgArray->GetLength(&numMsgs); if (numMsgs > 0 ) //if only srcFolder has messages.. @@ -1918,17 +1918,17 @@ nsMsgLocalMailFolder::CopyFileMessage(ns aFile->GetFileSize(&fileSize); if (!CheckIfSpaceForCopy(msgWindow, nullptr, fileSupport, false, fileSize)) return NS_OK; nsCOMPtr messages(do_CreateInstance(NS_ARRAY_CONTRACTID)); if (msgToReplace) - messages->AppendElement(msgToReplace, false); + messages->AppendElement(msgToReplace); rv = InitCopyState(fileSupport, messages, msgToReplace ? true : false, listener, msgWindow, false, false); if (NS_SUCCEEDED(rv)) { if (mCopyState) mCopyState->m_newMsgKeywords = aNewMsgKeywords; @@ -2429,17 +2429,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndC mCopyState->m_message, true, getter_AddRefs(newHdr)); } uint32_t newHdrFlags; if (newHdr) { // turn off offline flag - it's not valid for local mail folders. newHdr->AndFlags(~nsMsgMessageFlags::Offline, &newHdrFlags); - mCopyState->m_destMessages->AppendElement(newHdr, false); + mCopyState->m_destMessages->AppendElement(newHdr); } } // we can do undo with the dest folder db, see bug #198909 //else // mCopyState->m_undoMsgTxn = nullptr; //null out the transaction because we can't undo w/o the msg db } // if we plan on allowing undo, (if we have a mCopyState->m_parseMsgState or not) @@ -2500,17 +2500,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndC { // ** jt - recording the message size for possible undo use; the // message size is different for pop3 and imap4 messages uint32_t msgSize; newHdr->GetMessageSize(&msgSize); localUndoTxn->AddDstMsgSize(msgSize); } - mCopyState->m_destMessages->AppendElement(newHdr, false); + mCopyState->m_destMessages->AppendElement(newHdr); } // msgDb->SetSummaryValid(true); // msgDb->Commit(nsMsgDBCommitType::kLargeCommit); } else mCopyState->m_undoMsgTxn = nullptr; //null out the transaction because we can't undo w/o the msg db mCopyState->m_parseMsgState->Clear(); @@ -2583,17 +2583,17 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndC nsCOMPtr notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID)); if (notifier) { notifier->NotifyMsgAdded(newHdr); // We do not appear to trigger classification in this case, so let's // paper over the abyss by just sending the classification notification. nsCOMPtr oneHeaderArray = do_CreateInstance(NS_ARRAY_CONTRACTID); - oneHeaderArray->AppendElement(newHdr, false); + oneHeaderArray->AppendElement(newHdr); notifier->NotifyMsgsClassified(oneHeaderArray, false, false); // (We do not add the NotReportedClassified processing flag since we // just reported it!) } } } return rv; } @@ -3549,17 +3549,17 @@ nsMsgLocalMailFolder::OnMessageClassifie nsMsgKey msgKey = mSpamKeysToMove.ElementAt(keyIndex); nsMsgProcessingFlagType processingFlags; GetProcessingFlags(msgKey, &processingFlags); if (folder && !(processingFlags & nsMsgProcessingFlags::FilterToMove)) { nsCOMPtr mailHdr; rv = GetMessageHeader(msgKey, getter_AddRefs(mailHdr)); if (NS_SUCCEEDED(rv) && mailHdr) - messages->AppendElement(mailHdr, false); + messages->AppendElement(mailHdr); } else { // We don't need the processing flag any more. AndProcessingFlags(msgKey, ~nsMsgProcessingFlags::FilterToMove); } } @@ -3738,17 +3738,17 @@ nsMsgLocalMailFolder::AddMessageBatch(ui outFileStream->Write(aMessages[i], messageLen, &bytesWritten); newMailParser->BufferInput(aMessages[i], messageLen); msgStore->FinishNewMessage(outFileStream, newHdr); outFileStream->Close(); outFileStream = nullptr; newMailParser->OnStopRequest(nullptr, nullptr, NS_OK); newMailParser->EndMsgDownload(); - hdrArray->AppendElement(newHdr, false); + hdrArray->AppendElement(newHdr); } NS_ADDREF(*aHdrArray = hdrArray); } ReleaseSemaphore(static_cast(this)); return rv; } NS_IMETHODIMP diff --git a/mailnews/local/src/nsLocalUndoTxn.cpp b/mailnews/local/src/nsLocalUndoTxn.cpp --- a/mailnews/local/src/nsLocalUndoTxn.cpp +++ b/mailnews/local/src/nsLocalUndoTxn.cpp @@ -256,19 +256,19 @@ nsLocalMoveCopyMsgTxn::UndoTransactionIn oldHdr, true, getter_AddRefs(newHdr)); NS_ASSERTION(newHdr, "fatal ... cannot create new msg header\n"); if (NS_SUCCEEDED(rv) && newHdr) { newHdr->SetStatusOffset(m_srcStatusOffsetArray[i]); srcDB->UndoDelete(newHdr); - srcMessages->AppendElement(newHdr, false); + srcMessages->AppendElement(newHdr); // (we want to keep these two lists in sync) - dstMessages->AppendElement(oldHdr, false); + dstMessages->AppendElement(oldHdr); } } } nsCOMPtr notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID)); if (notifier) { @@ -295,17 +295,17 @@ nsLocalMoveCopyMsgTxn::UndoTransactionIn dstDB->ContainsKey(m_dstKeyArray[i], &hasKey); nsCOMPtr dstHdr; if (hasKey) dstDB->GetMsgHdrForKey(m_dstKeyArray[i], getter_AddRefs(dstHdr)); if (dstHdr) { nsCString messageId; dstHdr->GetMessageId(getter_Copies(messageId)); - dstMessages->AppendElement(dstHdr, false); + dstMessages->AppendElement(dstHdr); m_copiedMsgIds.AppendElement(messageId); } else { NS_WARNING("Cannot get old msg header"); } } if (m_copiedMsgIds.Length()) @@ -361,17 +361,17 @@ nsLocalMoveCopyMsgTxn::RedoTransaction() { rv = srcDB->GetMsgHdrForKey(m_srcKeyArray[i], getter_AddRefs(oldHdr)); NS_ASSERTION(oldHdr, "fatal ... cannot get old msg header\n"); if (NS_SUCCEEDED(rv) && oldHdr) { msgSupports =do_QueryInterface(oldHdr); - srcMessages->AppendElement(msgSupports, false); + srcMessages->AppendElement(msgSupports); if (m_canUndelete) { rv = dstDB->CopyHdrFromExistingHdr(m_dstKeyArray[i], oldHdr, true, getter_AddRefs(newHdr)); NS_ASSERTION(newHdr, "fatal ... cannot get new msg header\n"); if (NS_SUCCEEDED(rv) && newHdr) diff --git a/mailnews/local/src/nsMsgMaildirStore.cpp b/mailnews/local/src/nsMsgMaildirStore.cpp --- a/mailnews/local/src/nsMsgMaildirStore.cpp +++ b/mailnews/local/src/nsMsgMaildirStore.cpp @@ -1089,17 +1089,17 @@ nsMsgMaildirStore::CopyMessages(bool aIs NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr destHdr; if (destDB) { rv = destDB->CopyHdrFromExistingHdr(nsMsgKey_None, srcHdr, true, getter_AddRefs(destHdr)); NS_ENSURE_SUCCESS(rv, rv); destHdr->SetStringProperty("storeToken", fileName.get()); - dstHdrs->AppendElement(destHdr, false); + dstHdrs->AppendElement(destHdr); nsMsgKey dstKey; destHdr->GetMessageKey(&dstKey); msgTxn->AddDstKey(dstKey); if (aListener) aListener->SetMessageKey(dstKey); } } nsCOMPtr notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID)); diff --git a/mailnews/local/src/nsParseMailbox.cpp b/mailnews/local/src/nsParseMailbox.cpp --- a/mailnews/local/src/nsParseMailbox.cpp +++ b/mailnews/local/src/nsParseMailbox.cpp @@ -2101,17 +2101,17 @@ NS_IMETHODIMP nsParseNewMailState::Apply case nsMsgFilterAction::CopyToFolder: { nsCString uri; rv = m_rootFolder->GetURI(uri); if (!actionTargetFolderUri.IsEmpty() && !actionTargetFolderUri.Equals(uri)) { nsCOMPtr messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID)); - messageArray->AppendElement(msgHdr, false); + messageArray->AppendElement(msgHdr); nsCOMPtr dstFolder; nsCOMPtr copyService; rv = GetExistingFolder(actionTargetFolderUri, getter_AddRefs(dstFolder)); if (NS_SUCCEEDED(rv)) { copyService = do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv); } @@ -2149,31 +2149,31 @@ NS_IMETHODIMP nsParseNewMailState::Apply msgHdr->OrFlags(nsMsgMessageFlags::Ignored, &newFlags); break; case nsMsgFilterAction::WatchThread: msgHdr->OrFlags(nsMsgMessageFlags::Watched, &newFlags); break; case nsMsgFilterAction::MarkFlagged: { nsCOMPtr messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID)); - messageArray->AppendElement(msgHdr, false); + messageArray->AppendElement(msgHdr); m_downloadFolder->MarkMessagesFlagged(messageArray, true); } break; case nsMsgFilterAction::ChangePriority: nsMsgPriorityValue filterPriority; filterAction->GetPriority(&filterPriority); msgHdr->SetPriority(filterPriority); break; case nsMsgFilterAction::AddTag: { nsCString keyword; filterAction->GetStrValue(keyword); nsCOMPtr messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID)); - messageArray->AppendElement(msgHdr, false); + messageArray->AppendElement(msgHdr); m_downloadFolder->AddKeywordsToMessages(messageArray, keyword); break; } case nsMsgFilterAction::Label: nsMsgLabelValue filterLabel; filterAction->GetLabel(&filterLabel); nsMsgKey msgKey; msgHdr->GetMessageKey(&msgKey); @@ -2217,17 +2217,17 @@ NS_IMETHODIMP nsParseNewMailState::Apply nsCOMPtr downloadFolder; msgHdr->GetFolder(getter_AddRefs(downloadFolder)); nsCOMPtr localFolder = do_QueryInterface(downloadFolder); msgHdr->GetFlags(&flags); if (localFolder) { nsCOMPtr messages = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); - messages->AppendElement(msgHdr, false); + messages->AppendElement(msgHdr); // This action ignores the deleteMailLeftOnServer preference localFolder->MarkMsgsOnPop3Server(messages, POP3_FORCE_DEL); // If this is just a header, throw it away. It's useless now // that the server copy is being deleted. if (flags & nsMsgMessageFlags::Partial) { m_msgMovedByFilter = true; @@ -2242,17 +2242,17 @@ NS_IMETHODIMP nsParseNewMailState::Apply nsCOMPtr downloadFolder; msgHdr->GetFolder(getter_AddRefs(downloadFolder)); nsCOMPtr localFolder = do_QueryInterface(downloadFolder); msgHdr->GetFlags(&flags); if (localFolder && (flags & nsMsgMessageFlags::Partial)) { nsCOMPtr messages = do_CreateInstance(NS_ARRAY_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); - messages->AppendElement(msgHdr, false); + messages->AppendElement(msgHdr); localFolder->MarkMsgsOnPop3Server(messages, POP3_FETCH_BODY); // Don't add this header to the DB, we're going to replace it // with the full message. m_msgMovedByFilter = true; msgIsNew = false; // Don't do anything else in this filter, wait until we // have the full message. *applyMore = false; @@ -2275,17 +2275,17 @@ NS_IMETHODIMP nsParseNewMailState::Apply nsAutoCString value; filterAction->GetStrValue(value); nsCOMPtr messageArray( do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_TRUE(messageArray, rv); if (NS_SUCCEEDED(rv)) - rv = messageArray->AppendElement(msgHdr, false); + rv = messageArray->AppendElement(msgHdr); if (NS_SUCCEEDED(rv)) rv = customAction->Apply(messageArray, value, nullptr, nsMsgFilterType::InboxRule, msgWindow); if (NS_FAILED(rv)) { // XXX: Invoke MSG_LOG_TO_CONSOLE once bug 1135265 lands. if (loggingEnabled) @@ -2372,17 +2372,17 @@ nsresult nsParseNewMailState::ApplyForwa m_replyTemplateUri.Clear(); m_msgToForwardOrReply = nullptr; return rv; } void nsParseNewMailState::MarkFilteredMessageRead(nsIMsgDBHdr *msgHdr) { nsCOMPtr messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID)); - messageArray->AppendElement(msgHdr, false); + messageArray->AppendElement(msgHdr); m_downloadFolder->MarkMessagesRead(messageArray, true); } void nsParseNewMailState::MarkFilteredMessageUnread(nsIMsgDBHdr *msgHdr) { uint32_t newFlags; if (m_mailDB) { @@ -2390,17 +2390,17 @@ void nsParseNewMailState::MarkFilteredMe msgHdr->GetMessageKey(&msgKey); m_mailDB->AddToNewList(msgKey); } else { msgHdr->OrFlags(nsMsgMessageFlags::New, &newFlags); } nsCOMPtr messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID)); - messageArray->AppendElement(msgHdr, false); + messageArray->AppendElement(msgHdr); m_downloadFolder->MarkMessagesRead(messageArray, false); } nsresult nsParseNewMailState::EndMsgDownload() { if (m_moveCoalescer) m_moveCoalescer->PlaybackMoves(); diff --git a/mailnews/news/src/nsNNTPNewsgroupList.cpp b/mailnews/news/src/nsNNTPNewsgroupList.cpp --- a/mailnews/news/src/nsNNTPNewsgroupList.cpp +++ b/mailnews/news/src/nsNNTPNewsgroupList.cpp @@ -689,17 +689,17 @@ NS_IMETHODIMP nsNNTPNewsgroupList::Apply m_newMsgHdr->SetPriority(filterPriority); } break; case nsMsgFilterAction::AddTag: { nsCString keyword; filterAction->GetStrValue(keyword); nsCOMPtr messageArray(do_CreateInstance(NS_ARRAY_CONTRACTID)); - messageArray->AppendElement(m_newMsgHdr, false); + messageArray->AppendElement(m_newMsgHdr); nsCOMPtr folder = do_QueryInterface(m_newsFolder, &rv); if (folder) folder->AddKeywordsToMessages(messageArray, keyword); break; } case nsMsgFilterAction::Label: { nsMsgLabelValue filterLabel; @@ -724,17 +724,17 @@ NS_IMETHODIMP nsNNTPNewsgroupList::Apply NS_ENSURE_SUCCESS(rv, rv); nsAutoCString value; filterAction->GetStrValue(value); nsCOMPtr messageArray( do_CreateInstance(NS_ARRAY_CONTRACTID, &rv)); NS_ENSURE_TRUE(messageArray, rv); - messageArray->AppendElement(m_newMsgHdr, false); + messageArray->AppendElement(m_newMsgHdr); customAction->Apply(messageArray, value, nullptr, nsMsgFilterType::NewsRule, aMsgWindow); } break; default: NS_ERROR("unexpected action"); diff --git a/mailnews/news/src/nsNewsFolder.cpp b/mailnews/news/src/nsNewsFolder.cpp --- a/mailnews/news/src/nsNewsFolder.cpp +++ b/mailnews/news/src/nsNewsFolder.cpp @@ -1531,17 +1531,17 @@ NS_IMETHODIMP nsMsgNewsFolder::RemoveMes nsCOMPtr notifier(do_GetService(NS_MSGNOTIFICATIONSERVICE_CONTRACTID)); if (notifier) { nsCOMPtr msgHdr; rv = mDatabase->GetMsgHdrForKey(key, getter_AddRefs(msgHdr)); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr msgHdrs(do_CreateInstance(NS_ARRAY_CONTRACTID)); - msgHdrs->AppendElement(msgHdr, false); + msgHdrs->AppendElement(msgHdr); notifier->NotifyMsgsDeleted(msgHdrs); } return mDatabase->DeleteMessage(key, nullptr, false); } NS_IMETHODIMP nsMsgNewsFolder::RemoveMessages(nsTArray &aMsgKeys) { diff --git a/suite/components/profile/nsNetscapeProfileMigratorBase.cpp b/suite/components/profile/nsNetscapeProfileMigratorBase.cpp --- a/suite/components/profile/nsNetscapeProfileMigratorBase.cpp +++ b/suite/components/profile/nsNetscapeProfileMigratorBase.cpp @@ -385,23 +385,23 @@ nsNetscapeProfileMigratorBase::GetProfil rv = rootDir->SetPersistentDescriptor(filePath); if (NS_FAILED(rv)) continue; bool exists; rootDir->Exists(&exists); if (exists) { - aProfileLocations->AppendElement(rootDir, false); + aProfileLocations->AppendElement(rootDir); nsCOMPtr profileNameString( do_CreateInstance("@mozilla.org/supports-string;1")); profileNameString->SetData(NS_ConvertUTF8toUTF16(buffer)); - aProfileNames->AppendElement(profileNameString, false); + aProfileNames->AppendElement(profileNameString); } } return NS_OK; } nsresult nsNetscapeProfileMigratorBase::CopyFile(const char* aSourceFileName, const char* aTargetFileName)