| Index: content/browser/browser_main_loop.cc
|
| diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
|
| index d7d261bcc51d19d91faab2fb098529c7d4c2e660..90c8b2e6b78d5e4722f6f13a20b5deadba62470e 100644
|
| --- a/content/browser/browser_main_loop.cc
|
| +++ b/content/browser/browser_main_loop.cc
|
| @@ -1528,16 +1528,8 @@ void BrowserMainLoop::InitializeMemoryManagementComponent() {
|
| if (base::FeatureList::IsEnabled(features::kMemoryCoordinator)) {
|
| // Disable MemoryPressureListener when memory coordinator is enabled.
|
| base::MemoryPressureListener::SetNotificationsSuppressed(true);
|
| - // base::Unretained is safe because the lifetime of MemoryCoordinator is
|
| - // tied to the lifetime of the browser process.
|
| - base::MemoryCoordinatorProxy::GetInstance()->
|
| - SetGetCurrentMemoryStateCallback(base::Bind(
|
| - &MemoryCoordinator::GetCurrentMemoryState,
|
| - base::Unretained(MemoryCoordinator::GetInstance())));
|
| - base::MemoryCoordinatorProxy::GetInstance()->
|
| - SetSetCurrentMemoryStateForTestingCallback(base::Bind(
|
| - &MemoryCoordinator::SetCurrentMemoryStateForTesting,
|
| - base::Unretained(MemoryCoordinator::GetInstance())));
|
| + base::MemoryCoordinatorProxy::GetInstance()->Set(
|
| + MemoryCoordinator::GetInstance()->GetWeakPtr());
|
|
|
| if (memory_pressure_monitor_) {
|
| memory_pressure_monitor_->SetDispatchCallback(
|
|
|