diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-29 01:14:03 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-29 01:14:03 +0000 |
commit | f92caf26c7dfb54fa072082b6129d57e1a050a2f (patch) | |
tree | 34a6ba85c05fb736ae605ecc0c40aab16f44b5b6 /chrome/browser/dom_ui | |
parent | 9a3a072c7b353947c3aa6153c82f11eca6de366d (diff) | |
download | chromium_src-f92caf26c7dfb54fa072082b6129d57e1a050a2f.zip chromium_src-f92caf26c7dfb54fa072082b6129d57e1a050a2f.tar.gz chromium_src-f92caf26c7dfb54fa072082b6129d57e1a050a2f.tar.bz2 |
Call Release instead of deleteing the object directly.
BUG=25354
TBR=nsylvain
Review URL: http://codereview.chromium.org/341027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30414 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r-- | chrome/browser/dom_ui/new_tab_ui.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index 5f50603..6071a2b 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -578,8 +578,10 @@ NewTabUI::NewTabUI(TabContents* contents) &chrome_url_data_manager, &ChromeURLDataManager::AddDataSource, html_source)); - if (!posted) - delete html_source; // Keep Valgrind happy in tests. + if (!posted) { + html_source->AddRef(); + html_source->Release(); // Keep Valgrind happy in tests. + } } // Listen for theme installation. @@ -623,8 +625,10 @@ void NewTabUI::InitializeCSSCaches() { &chrome_url_data_manager, &ChromeURLDataManager::AddDataSource, theme)); - if (!posted) - delete theme; // Keep Valgrind happy in tests. + if (!posted) { + theme->AddRef(); + theme->Release(); // Keep Valgrind happy in tests. + } } // static |