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

Unified Diff: chrome/browser/ui/webui/version_handler.cc

Issue 23686018: Fix a memory leak in chrome://version handler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 3 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/ui/webui/version_handler.cc
===================================================================
--- chrome/browser/ui/webui/version_handler.cc (revision 222257)
+++ chrome/browser/ui/webui/version_handler.cc (working copy)
@@ -85,7 +85,6 @@
base::Owned(profile_path_buffer)));
// Respond with the variations info immediately.
- scoped_ptr<ListValue> variations_list(new ListValue());
std::vector<std::string> variations;
#if !defined(NDEBUG)
base::FieldTrial::ActiveGroups active_groups;
@@ -108,14 +107,14 @@
variations.push_back(UTF16ToASCII(active_groups[i]));
#endif
+ ListValue variations_list;
for (std::vector<std::string>::const_iterator it = variations.begin();
it != variations.end(); ++it) {
- variations_list->Append(Value::CreateStringValue(*it));
+ variations_list.Append(Value::CreateStringValue(*it));
}
// In release mode, this will return an empty list to clear the section.
- web_ui()->CallJavascriptFunction("returnVariationInfo",
- *variations_list.release());
+ web_ui()->CallJavascriptFunction("returnVariationInfo", variations_list);
}
void VersionHandler::OnGotFilePaths(string16* executable_path_data,
« 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