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

Unified Diff: chrome/test/chromedriver/logging.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/logging.cc
diff --git a/chrome/test/chromedriver/logging.cc b/chrome/test/chromedriver/logging.cc
index 7f891ac24e21366642d4fa8e20556dff276896d3..67f60e4acff040e479f71ccc41daaa2c4ebed961 100644
--- a/chrome/test/chromedriver/logging.cc
+++ b/chrome/test/chromedriver/logging.cc
@@ -8,6 +8,8 @@
#include <stdint.h>
#include <stdio.h>
+#include <utility>
+
#include "base/command_line.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
@@ -188,7 +190,7 @@ void WebDriverLog::AddEntryTimestamped(const base::Time& timestamp,
if (!source.empty())
log_entry_dict->SetString("source", source);
log_entry_dict->SetString("message", message);
- entries_->Append(log_entry_dict.release());
+ entries_->Append(std::move(log_entry_dict));
}
const std::string& WebDriverLog::type() const {

Powered by Google App Engine
This is Rietveld 408576698