Bug 848253, release memory sooner when mutating session history, r=jlebar
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Wed, 15 May 2013 14:48:48 +0300
changeset 131973 1695bdfbfa8e80c197794832f39a5a32969ca420
parent 131972 a8f45cb70707725e9fbe247677bde9714a264e5e
child 131974 21356b1fc017348eea08f7c8b8cbc3ce441fd6cf
push id24678
push userryanvm@gmail.com
push dateThu, 16 May 2013 01:15:09 +0000
treeherdermozilla-central@19cc1efe8097 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlebar
bugs848253
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 848253, release memory sooner when mutating session history, r=jlebar
docshell/base/nsDocShell.cpp
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -10496,16 +10496,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) {