Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(660)

Unified Diff: chrome/browser/dom_ui/new_tab_ui.cc

Issue 341027: Call Release instead of deleteing the object directly. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/new_tab_ui.cc
===================================================================
--- chrome/browser/dom_ui/new_tab_ui.cc (revision 30410)
+++ chrome/browser/dom_ui/new_tab_ui.cc (working copy)
@@ -578,8 +578,10 @@
&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 @@
&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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698