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

Unified Diff: components/search_engines/util.cc

Issue 2404593002: Don't access owning pointers after they've relinquished ownership. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/util.cc
diff --git a/components/search_engines/util.cc b/components/search_engines/util.cc
index 3ad9a198b7abe9af1670acf0d472f72e8c83402e..e6ec9c72e57d2b0310b6c0dfaf27baa2af1eb64a 100644
--- a/components/search_engines/util.cc
+++ b/components/search_engines/util.cc
@@ -200,9 +200,9 @@ void MergeEnginesFromPrepopulateData(
for (const auto* removed_engine : actions.removed_engines) {
auto j = FindTemplateURL(template_urls, removed_engine);
DCHECK(j != template_urls->end());
- std::unique_ptr<TemplateURL> template_url = std::move(*j);
DCHECK(!default_search_provider ||
(*j)->prepopulate_id() != default_search_provider->prepopulate_id());
+ std::unique_ptr<TemplateURL> template_url = std::move(*j);
template_urls->erase(j);
if (service) {
service->RemoveKeyword(template_url->id());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698