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

Unified Diff: chrome/test/chromedriver/commands.cc

Issue 2051663003: base::ListValue::Append cleanup: pass unique_ptr instead of the released pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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
Index: chrome/test/chromedriver/commands.cc
diff --git a/chrome/test/chromedriver/commands.cc b/chrome/test/chromedriver/commands.cc
index f5692f8d2a90e40d692fe632348287e4995ec808..85ecac8da6e3b729da5e44401913e26ae6f2808f 100644
--- a/chrome/test/chromedriver/commands.cc
+++ b/chrome/test/chromedriver/commands.cc
@@ -93,7 +93,7 @@ void OnGetSession(const base::WeakPtr<size_t>& session_remaining_count,
std::unique_ptr<base::DictionaryValue> session(new base::DictionaryValue());
session->Set("id", new base::StringValue(session_id));
session->Set("capabilities", value->DeepCopy());
- session_list->Append(session.release());
+ session_list->Append(std::move(session));
if (!*session_remaining_count) {
all_get_session_func.Run();

Powered by Google App Engine
This is Rietveld 408576698