Commit 955535cb authored by Francois Doray's avatar Francois Doray Committed by Commit Bot

RC: Do not allow freezing a tab that is discarded.

In the current state, TabManager::PerformStateTransitions() needlessly
tries to freeze discarded tabs.

Bug: 775644
Change-Id: Ieb26cd4a1251b8575308122311bdeabcff831acd
Reviewed-on: https://chromium-review.googlesource.com/1093310Reviewed-by: default avatarChris Hamilton <chrisha@chromium.org>
Reviewed-by: default avatarFadi Meawad <fmeawad@chromium.org>
Commit-Queue: Chris Hamilton <chrisha@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565777}
parent 23ea4334
......@@ -258,9 +258,11 @@ bool TabLifecycleUnitSource::TabLifecycleUnit::CanFreeze(
// rejection reasons. These aren't worth reporting about, as they have nothing
// to do with the content itself.
// Can't freeze a tab that is already frozen.
if (IsFrozenOrPendingFreeze(GetState()))
// Can't freeze a tab that is already frozen or discarded.
if (IsFrozenOrPendingFreeze(GetState()) ||
IsDiscardedOrPendingDiscard(GetState())) {
return false;
}
// Allow a page to load fully before freezing it.
if (TabLoadTracker::Get()->GetLoadingState(GetWebContents()) !=
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment