Chromium Code Reviews| Index: chrome/browser/chromeos/oom_priority_manager.cc |
| diff --git a/chrome/browser/chromeos/oom_priority_manager.cc b/chrome/browser/chromeos/oom_priority_manager.cc |
| index b41a512bd984b0574c1d097c6e424c81c368ffc4..ce45e59de0194991ff032789db4118bfeb8d7e3f 100644 |
| --- a/chrome/browser/chromeos/oom_priority_manager.cc |
| +++ b/chrome/browser/chromeos/oom_priority_manager.cc |
| @@ -230,8 +230,8 @@ bool OomPriorityManager::DiscardTabById(int64 target_web_contents_id) { |
| Browser* browser = *browser_iterator; |
| TabStripModel* model = browser->tab_strip_model(); |
| for (int idx = 0; idx < model->count(); idx++) { |
| - // Can't discard tabs that are already discarded. |
| - if (model->IsTabDiscarded(idx)) |
| + // Can't discard tabs that are already discarded or selected. |
| + if (model->IsTabDiscarded(idx) || model->IsTabSelected(idx)) |
|
sky
2012/09/24 13:56:11
Is it the selected tab, or the active tab we care
simonhong_
2012/09/24 15:15:46
Done.
|
| continue; |
| WebContents* web_contents = model->GetTabContentsAt(idx)->web_contents(); |
| int64 web_contents_id = IdFromTabContents(web_contents); |