| Index: third_party/leveldatabase/env_chromium.cc
|
| diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
|
| index 928d4be2027d0ab979c2e1f8aa9b1029b2e133b8..7a0f4ad03f18b378b52d94398510e54e6ccb05a4 100644
|
| --- a/third_party/leveldatabase/env_chromium.cc
|
| +++ b/third_party/leveldatabase/env_chromium.cc
|
| @@ -11,6 +11,7 @@
|
| #include <sys/types.h>
|
| #endif
|
|
|
| +#include "base/bind.h"
|
| #include "base/files/file_enumerator.h"
|
| #include "base/files/file_util.h"
|
| #include "base/format_macros.h"
|
| @@ -1192,7 +1193,9 @@ class DBTracker::MemoryDumpProvider
|
| public:
|
| bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
|
| base::trace_event::ProcessMemoryDump* pmd) override {
|
| - auto db_visitor = [&](TrackedDB* db) {
|
| + auto db_visitor = [](const base::trace_event::MemoryDumpArgs& args,
|
| + base::trace_event::ProcessMemoryDump* pmd,
|
| + TrackedDB* db) {
|
| std::string db_dump_name = base::StringPrintf(
|
| "leveldatabase/0x%" PRIXPTR, reinterpret_cast<uintptr_t>(db));
|
| auto* db_dump = pmd->CreateAllocatorDump(db_dump_name.c_str());
|
| @@ -1222,7 +1225,8 @@ class DBTracker::MemoryDumpProvider
|
| }
|
| };
|
|
|
| - DBTracker::GetInstance()->VisitDatabases(db_visitor);
|
| + DBTracker::GetInstance()->VisitDatabases(
|
| + base::BindRepeating(db_visitor, args, base::Unretained(pmd)));
|
| return true;
|
| }
|
| };
|
| @@ -1256,7 +1260,7 @@ leveldb::Status DBTracker::OpenDatabase(const leveldb::Options& options,
|
| void DBTracker::VisitDatabases(const DatabaseVisitor& visitor) {
|
| base::AutoLock lock(databases_lock_);
|
| for (auto* i = databases_.head(); i != databases_.end(); i = i->next()) {
|
| - visitor(i->value());
|
| + visitor.Run(i->value());
|
| }
|
| }
|
|
|
|
|