cef/patch/patches/metrics_system_profile.patch
Nik Pavlov 5d817b20a6 Update to Chromium version 131.0.6768.0 (#1366576)
mac: Switch to Xcode 16.0 16A242d with macOS SDK 15.0 24A336
2024-10-24 11:24:17 -04:00

31 lines
1.2 KiB
Diff

diff --git components/metrics/persistent_system_profile.cc components/metrics/persistent_system_profile.cc
index 5cfe0451159cf..96fdbcb5e8c09 100644
--- components/metrics/persistent_system_profile.cc
+++ components/metrics/persistent_system_profile.cc
@@ -400,6 +400,10 @@ bool PersistentSystemProfile::GetSystemProfile(
return true;
}
+void PersistentSystemProfile::DetachFromCurrentThread() {
+ DETACH_FROM_THREAD(thread_checker_);
+}
+
// static
void PersistentSystemProfile::MergeUpdateRecords(
const base::PersistentMemoryAllocator& memory_allocator,
diff --git components/metrics/persistent_system_profile.h components/metrics/persistent_system_profile.h
index 426ed30d15be2..088fffc40f8a0 100644
--- components/metrics/persistent_system_profile.h
+++ components/metrics/persistent_system_profile.h
@@ -64,6 +64,10 @@ class PersistentSystemProfile {
const base::PersistentMemoryAllocator& memory_allocator,
SystemProfileProto* system_profile);
+ // Detaches this object from the current thread in preparation for a move to
+ // a different thread.
+ void DetachFromCurrentThread();
+
private:
friend class PersistentSystemProfileTest;