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

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

Issue 155579: Fix leak in ShownSectionsHandler::HandleGetShownSections and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 | « chrome/browser/dom_ui/dom_ui_favicon_source.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/shown_sections_handler.cc
===================================================================
--- chrome/browser/dom_ui/shown_sections_handler.cc (revision 20716)
+++ chrome/browser/dom_ui/shown_sections_handler.cc (working copy)
@@ -19,8 +19,8 @@
void ShownSectionsHandler::HandleGetShownSections(const Value* value) {
const int mode = dom_ui_->GetProfile()->GetPrefs()->
GetInteger(prefs::kNTPShownSections);
- FundamentalValue* mode_value = new FundamentalValue(mode);
- dom_ui_->CallJavascriptFunction(L"onShownSections", *mode_value);
+ FundamentalValue mode_value(mode);
+ dom_ui_->CallJavascriptFunction(L"onShownSections", mode_value);
}
void ShownSectionsHandler::HandleSetShownSections(const Value* value) {
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_favicon_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698