Bug 1486356 - Remove the XPCOM component registration for nsSHTransaction. r=nika
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 27 Aug 2018 14:27:34 +1000
changeset 481978 f0ac277e134ea8e3127c2ee576bb0ecb0fe9f4cc
parent 481977 3cee994fc8c4af8d4e0c342927551ff6c40c8152
child 481979 ca8c35ea8619a3aebfcebb318b5c60266131426d
push id232
push userfmarier@mozilla.com
push dateWed, 05 Sep 2018 20:45:54 +0000
reviewersnika
bugs1486356
milestone63.0a1
Bug 1486356 - Remove the XPCOM component registration for nsSHTransaction. r=nika
docshell/shistory/nsSHistory.cpp
--- a/docshell/shistory/nsSHistory.cpp
+++ b/docshell/shistory/nsSHistory.cpp
@@ -645,18 +645,17 @@ nsSHistory::AddEntry(nsISHEntry* aSHEntr
 
   if (!currentPersist) {
     NOTIFY_LISTENERS(OnHistoryReplaceEntry, (currentIndex));
     NS_ENSURE_SUCCESS(currentTxn->SetSHEntry(aSHEntry), NS_ERROR_FAILURE);
     currentTxn->SetPersist(aPersist);
     return NS_OK;
   }
 
-  nsCOMPtr<nsISHTransaction> txn(new nsSHTransaction());
-
+  nsCOMPtr<nsISHTransaction> txn = new nsSHTransaction();
   nsCOMPtr<nsIURI> uri;
   aSHEntry->GetURI(getter_AddRefs(uri));
   NOTIFY_LISTENERS(OnHistoryNewEntry, (uri, currentIndex));
 
   // If a listener has changed mIndex, we need to get currentTxn again,
   // otherwise we'll be left at an inconsistent state (see bug 320742)
   if (currentIndex != mIndex) {
     GetTransactionAtIndex(mIndex, getter_AddRefs(currentTxn));