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

Unified Diff: chrome/test/chromedriver/element_util.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/element_util.cc
diff --git a/chrome/test/chromedriver/element_util.cc b/chrome/test/chromedriver/element_util.cc
index a273b1864b6197ba707d973244740095b9958b90..7ba14d30791ff33dcf8afa465c08ef2cee4a0f10 100644
--- a/chrome/test/chromedriver/element_util.cc
+++ b/chrome/test/chromedriver/element_util.cc
@@ -4,6 +4,8 @@
#include "chrome/test/chromedriver/element_util.h"
+#include <utility>
+
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
@@ -240,7 +242,7 @@ Status FindElement(int interval_ms,
std::unique_ptr<base::DictionaryValue> locator(new base::DictionaryValue());
locator->SetString(strategy, target);
base::ListValue arguments;
- arguments.Append(locator.release());
+ arguments.Append(std::move(locator));
if (root_element_id)
arguments.Append(CreateElement(*root_element_id));

Powered by Google App Engine
This is Rietveld 408576698