Index: chrome/browser/ui/webui/conflicts_handler.cc |
diff --git a/chrome/browser/ui/webui/conflicts_handler.cc b/chrome/browser/ui/webui/conflicts_handler.cc |
index 75c06bdebc937ab6e7474e47456dd36247566de1..b6bb36ecf4f0941c5d98f50f579087675b639333 100644 |
--- a/chrome/browser/ui/webui/conflicts_handler.cc |
+++ b/chrome/browser/ui/webui/conflicts_handler.cc |
@@ -41,9 +41,7 @@ void ConflictsHandler::HandleRequestModuleList(const base::ListValue* args) { |
void ConflictsHandler::SendModuleList() { |
auto* loaded_modules = EnumerateModulesModel::GetInstance(); |
- base::ListValue* list = loaded_modules->GetModuleList(); |
- base::DictionaryValue results; |
- results.Set("moduleList", list); |
+ std::unique_ptr<base::ListValue> list = loaded_modules->GetModuleList(); |
// Add the section title and the total count for bad modules found. |
int confirmed_bad = loaded_modules->confirmed_bad_modules_detected(); |
@@ -59,6 +57,8 @@ void ConflictsHandler::SendModuleList() { |
base::IntToString16(list->GetSize()), |
base::IntToString16(confirmed_bad), base::IntToString16(suspected_bad)); |
} |
+ base::DictionaryValue results; |
+ results.Set("moduleList", std::move(list)); |
results.SetString("modulesTableTitle", table_title); |
web_ui()->CallJavascriptFunctionUnsafe("returnModuleList", results); |