Bug 848253 - Release memory sooner when mutating session history. r=jlebar, a=akeybl
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Wed, 15 May 2013 14:48:48 +0300
changeset 119443 0c187b6751a24df745c408114aceca4fde1a0a8c
parent 119442 a5c3ba754674b1defd74ba0d839349bf664a59bf
child 119444 8d224b15444874df8e445175ca6c0cbf4d9e665b
push id823
push userryanvm@gmail.com
push dateWed, 22 May 2013 20:51:56 +0000
reviewersjlebar, akeybl
bugs848253
milestone18.0
Bug 848253 - Release memory sooner when mutating session history. r=jlebar, a=akeybl
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -10409,16 +10409,17 @@ nsDocShell::AddToSessionHistory(nsIURI *
             int32_t childCount = 0;
             shContainer->GetChildCount(&childCount);
             // Remove all children of this entry 
             for (int32_t i = childCount - 1; i >= 0; i--) {
                 nsCOMPtr<nsISHEntry> child;
                 shContainer->GetChildAt(i, getter_AddRefs(child));
                 shContainer->RemoveChild(child);
             }  // for
+            entry->AbandonBFCacheEntry();
         }  // shContainer
     }
 
     // Create a new entry if necessary.
     if (!entry) {
         entry = do_CreateInstance(NS_SHENTRY_CONTRACTID);
 
         if (!entry) {