diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-03 20:41:03 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-03 20:41:03 +0000 |
commit | 42817a84250777ce11b87d7056ec0af3bc14e2db (patch) | |
tree | 5e83bf8d554d31166af4e6cf41f5763e4dd0489a | |
parent | 40cf71fbbba4914a5aaafacf95f400115520da62 (diff) | |
download | chromium_src-42817a84250777ce11b87d7056ec0af3bc14e2db.zip chromium_src-42817a84250777ce11b87d7056ec0af3bc14e2db.tar.gz chromium_src-42817a84250777ce11b87d7056ec0af3bc14e2db.tar.bz2 |
Fix a memory leak in all callers of DownloadHistory::Search.
We should delete the callback after running it.
This change removes Valgrind suppressions for the leak.
TEST=valgrind
BUG=50729
Review URL: http://codereview.chromium.org/2819085
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54810 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/download/download_history.cc | 1 | ||||
-rw-r--r-- | tools/valgrind/memcheck/suppressions.txt | 32 |
2 files changed, 1 insertions, 32 deletions
diff --git a/chrome/browser/download/download_history.cc b/chrome/browser/download/download_history.cc index 7c84385..1f59338 100644 --- a/chrome/browser/download/download_history.cc +++ b/chrome/browser/download/download_history.cc @@ -144,6 +144,7 @@ void DownloadHistory::OnSearchDownloadsComplete(HistoryService::Handle handle, } callback->RunWithParams(MakeTuple(download_items)); + delete callback; } int64 DownloadHistory::GetNextFakeDbHandle() { diff --git a/tools/valgrind/memcheck/suppressions.txt b/tools/valgrind/memcheck/suppressions.txt index e43d4b9..9eb5859 100644 --- a/tools/valgrind/memcheck/suppressions.txt +++ b/tools/valgrind/memcheck/suppressions.txt @@ -3647,38 +3647,6 @@ fun:_ZN7WebCore14DocumentWriter27endIfNotLoadingMainResourceEv } { - bug_50729 - Memcheck:Leak - fun:_Znw* - fun:_Z11NewCallbackI19DownloadsDOMHandlerSt6vectorIP12DownloadItemSaIS3_EEEPN9Callback1IT0_E4TypeEPT_MSB_FvS7_E - fun:_ZN19DownloadsDOMHandler12ModelChangedEv - fun:_ZN15DownloadManager11AddObserverEPNS_8ObserverE - fun:_ZN19DownloadsDOMHandler4InitEv - fun:_ZN11DownloadsUIC1EP11TabContents - fun:_Z8NewDOMUII11DownloadsUIEP5DOMUIP11TabContentsRK4GURL - fun:_ZN12DOMUIFactory17CreateDOMUIForURLEP11TabContentsRK4GURL - fun:_ZN11TabContents27CreateDOMUIForRenderManagerERK4GURL - fun:_ZN21RenderViewHostManager30UpdateRendererStateForNavigateERK15NavigationEntry - fun:_ZN21RenderViewHostManager8NavigateERK15NavigationEntry - fun:_ZN11TabContents22NavigateToPendingEntryEN20NavigationController10ReloadTypeE - fun:_ZN20NavigationController22NavigateToPendingEntryENS_10ReloadTypeE - fun:_ZN20NavigationController9LoadEntryEP15NavigationEntry - fun:_ZN20NavigationController7LoadURLERK4GURLS2_j - fun:_ZNK7Browser23CreateTabContentsForURLERK4GURLS2_P7ProfilejbP12SiteInstance - fun:_ZN7Browser13AddTabWithURLERK4GURLS2_jiiP12SiteInstanceRKSs - fun:_ZN7Browser16ShowSingletonTabERK4GURL - fun:_ZN7Browser16ShowDownloadsTabEv - fun:_ZN7Browser29ExecuteCommandWithDispositionEi21WindowOpenDisposition - fun:_ZN7Browser14ExecuteCommandEi - fun:_ZN18AutomationProvider21ExecuteBrowserCommandEiiPN3IPC7MessageE -} -{ - bug_50745 - Memcheck:Leak - ... - fun:_ZN19DownloadsDOMHandler12ModelChangedEv -} -{ bug_50766 Memcheck:Cond fun:_ZN3WTF9HashTableIyyNS_17IdentityExtractorIyEEN7WebCore12LinkHashHashENS_10HashTraitsIyEES6_E3addIyyNS_22IdentityHashTranslatorIyyS4_EEEESt4pairINS_17HashTableIteratorIyyS2_S4_S6_S6_EEbERKT_RKT0_ |