| Index: content/browser/memory/memory_coordinator_impl.cc
|
| diff --git a/content/browser/memory/memory_coordinator_impl.cc b/content/browser/memory/memory_coordinator_impl.cc
|
| index b403cf462dcf439def9fae164db4987440cc76c5..a8fd29d7b55026e2118f4dd2e4d369c86fe18561 100644
|
| --- a/content/browser/memory/memory_coordinator_impl.cc
|
| +++ b/content/browser/memory/memory_coordinator_impl.cc
|
| @@ -277,6 +277,11 @@ MemoryState MemoryCoordinatorImpl::GetStateForProcess(
|
| void MemoryCoordinatorImpl::UpdateConditionIfNeeded(
|
| MemoryCondition next_condition) {
|
| DCHECK(CalledOnValidThread());
|
| +
|
| + // Discard one tab when the system is under high memory pressure.
|
| + if (next_condition == MemoryCondition::CRITICAL)
|
| + DiscardTab();
|
| +
|
| if (memory_condition_ == next_condition)
|
| return;
|
|
|
| @@ -309,7 +314,6 @@ void MemoryCoordinatorImpl::UpdateConditionIfNeeded(
|
| // Set THROTTLED state to all clients/processes.
|
| UpdateBrowserStateAndNotifyStateToClients(MemoryState::THROTTLED);
|
| NotifyStateToChildren(MemoryState::THROTTLED);
|
| - // Idea: Start discarding tabs.
|
| }
|
| }
|
|
|
|
|