Bug 1617628 - Port "Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass" to Thunderbird rs=bustage-fix
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Wed, 26 Feb 2020 14:57:37 +0200
changeset 37439 b6948968da8c459ded34fc2e929d21222962cba8
parent 37438 f666055d952578464a012089ff80287153f87b10
child 37440 3f02fbbeaffa2f39fba0cada8c6180d343f40a40
push id2566
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:20:31 +0000
treeherdercomm-beta@a352facfa0a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage-fix
bugs1617628
Bug 1617628 - Port "Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass" to Thunderbird rs=bustage-fix
mailnews/imap/src/nsIMAPBodyShell.cpp
--- a/mailnews/imap/src/nsIMAPBodyShell.cpp
+++ b/mailnews/imap/src/nsIMAPBodyShell.cpp
@@ -1099,17 +1099,17 @@ bool nsIMAPBodyShellCache::AddShellToCac
   if (foundShell) {
     m_shellHash.Remove(foundShell->GetUID_validity());
     m_shellList->RemoveElement(foundShell);
   }
 
   // Add the new one to the cache
   m_shellList->AppendElement(shell);
 
-  m_shellHash.Put(shell->GetUID_validity(), shell);
+  m_shellHash.Put(shell->GetUID_validity(), RefPtr{shell});
   shell->SetIsCached(true);
 
   // while we're not over our size limit, eject entries
   bool rv = true;
   while (GetSize() > GetMaxSize()) rv = EjectEntry();
 
   return rv;
 }