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

Unified Diff: components/dom_distiller/webui/dom_distiller_handler.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: components/dom_distiller/webui/dom_distiller_handler.cc
diff --git a/components/dom_distiller/webui/dom_distiller_handler.cc b/components/dom_distiller/webui/dom_distiller_handler.cc
index e0c090686df72890f462a0094cd657265b4e2003..9d8970b6631ffd9df3511220d2662ef5a25a25f4 100644
--- a/components/dom_distiller/webui/dom_distiller_handler.cc
+++ b/components/dom_distiller/webui/dom_distiller_handler.cc
@@ -4,6 +4,7 @@
#include "components/dom_distiller/webui/dom_distiller_handler.h"
+#include <utility>
#include <vector>
#include "base/bind.h"
@@ -114,7 +115,7 @@ void DomDistillerHandler::HandleRequestEntries(const base::ListValue* args) {
? article.entry_id()
: article.title();
entry->SetString("title", net::EscapeForHTML(title));
- entries.Append(entry.release());
+ entries.Append(std::move(entry));
}
// TODO(nyquist): Write a test that ensures we sanitize the data we send.
web_ui()->CallJavascriptFunctionUnsafe("domDistiller.onReceivedEntries",

Powered by Google App Engine
This is Rietveld 408576698