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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 8888026: Fix leak in testing_automation_provider.cc by postponing creating a dictionary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 498c512fb02716d7f102c0501a637d718000c08d..f0da97c060490f024bea8f1da3daac28076bf05a 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -6300,10 +6300,10 @@ void TestingAutomationProvider::GetViews(
for (iter = extension_mgr->begin(); iter != extension_mgr->end();
++iter) {
ExtensionHost* host = *iter;
- DictionaryValue* dict = new DictionaryValue();
AutomationId id = automation_util::GetIdForExtensionView(host);
if (!id.is_valid())
continue;
+ DictionaryValue* dict = new DictionaryValue();
dict->Set("auto_id", id.ToValue());
dict->SetString("extension_id", host->extension_id());
view_list->Append(dict);
« 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