New issue
Advanced search Search tips

Issue 861800 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 20
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 861796



Sign in to add a comment

Fix TabLoadTracker's handling of prerendered contents and crashed tabs

Project Member Reported by shaseley@google.com, Jul 9

Issue description

Currently TabLoadTracker considers prerendendered WebContents and crashed tabs the same as open/alive tabs, which can inflate tab counts. TabLoadTracker should (1) not include prerendered contents in tab counts, and (2) transition to UNLOADED when the main frame's renderer is killed.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 10

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3292031f818e4443251a7a1f70c64440e01a1f45

commit 3292031f818e4443251a7a1f70c64440e01a1f45
Author: Scott Haseley <shaseley@google.com>
Date: Tue Jul 10 20:35:18 2018

RC: Add TabLoadTracker transition to UNLOADED when a tab's main frame renderer dies.

Previously when a renderer died, e.g. crash/sad tab or OOM killed on
Android, there was not a transition to UNLOADED. In these cases the
WebContents is not destroyed, so the LOADING/LOADED tab counts would be
inflated.

Bug:  861800 
Change-Id: I9d216d16d89d32a5ca11d1e1b901a1168c80d624
Reviewed-on: https://chromium-review.googlesource.com/1129373
Commit-Queue: Scott Haseley <shaseley@google.com>
Reviewed-by: François Doray <fdoray@chromium.org>
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573889}
[modify] https://crrev.com/3292031f818e4443251a7a1f70c64440e01a1f45/chrome/browser/resource_coordinator/tab_helper.cc
[modify] https://crrev.com/3292031f818e4443251a7a1f70c64440e01a1f45/chrome/browser/resource_coordinator/tab_helper.h
[modify] https://crrev.com/3292031f818e4443251a7a1f70c64440e01a1f45/chrome/browser/resource_coordinator/tab_load_tracker.cc
[modify] https://crrev.com/3292031f818e4443251a7a1f70c64440e01a1f45/chrome/browser/resource_coordinator/tab_load_tracker.h
[modify] https://crrev.com/3292031f818e4443251a7a1f70c64440e01a1f45/chrome/browser/resource_coordinator/tab_load_tracker_unittest.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Jul 25

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0bbb5a9cbd82b4ae1f0ab3f04b64c6f30c56669f

commit 0bbb5a9cbd82b4ae1f0ab3f04b64c6f30c56669f
Author: Scott Haseley <shaseley@google.com>
Date: Wed Jul 25 14:54:02 2018

RC: Add tracking of UI tab count to TabLoadTracker

Tab helpers are attached to prerender web contents, and as a result
TabLoadTracker counts these web contentses as tabs. This CL adds
additional tracking of non-UI tabs and adds Get*TabUiCount() methods
that exclude non-UI tabs from counts.

This CL also modifies CoreTabHelperDelegates to notify TabLoadTracker
when tab contents are swapped. In that case, non-UI tabs are promoted to
UI tabs.

Bug:  861800 
Change-Id: I3666b17634efd1445cd24cade8514fee06ad2c92
Reviewed-on: https://chromium-review.googlesource.com/1134504
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Tommy Nyquist <nyquist@chromium.org>
Commit-Queue: Scott Haseley <shaseley@google.com>
Cr-Commit-Position: refs/heads/master@{#577886}
[modify] https://crrev.com/0bbb5a9cbd82b4ae1f0ab3f04b64c6f30c56669f/chrome/browser/android/tab_android.cc
[modify] https://crrev.com/0bbb5a9cbd82b4ae1f0ab3f04b64c6f30c56669f/chrome/browser/resource_coordinator/tab_load_tracker.cc
[modify] https://crrev.com/0bbb5a9cbd82b4ae1f0ab3f04b64c6f30c56669f/chrome/browser/resource_coordinator/tab_load_tracker.h
[modify] https://crrev.com/0bbb5a9cbd82b4ae1f0ab3f04b64c6f30c56669f/chrome/browser/resource_coordinator/tab_load_tracker_unittest.cc
[modify] https://crrev.com/0bbb5a9cbd82b4ae1f0ab3f04b64c6f30c56669f/chrome/browser/ui/browser.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/852475a834469a6ac06fc46dd1ce55a91202e182

commit 852475a834469a6ac06fc46dd1ce55a91202e182
Author: Scott Haseley <shaseley@google.com>
Date: Mon Aug 20 16:27:44 2018

RC: Enable TabLoadTracker unit tests on Android

TabLoadTracker unit tests were enabled only on non-Android platforms,
but TabLoadTracker is included on Android builds.

Bug:  861800 
Change-Id: I571298a10dbc5113aaabde47a8288ad675c87e8b
Reviewed-on: https://chromium-review.googlesource.com/1129461
Reviewed-by: Chris Hamilton <chrisha@chromium.org>
Commit-Queue: Scott Haseley <shaseley@google.com>
Cr-Commit-Position: refs/heads/master@{#584469}
[modify] https://crrev.com/852475a834469a6ac06fc46dd1ce55a91202e182/chrome/test/BUILD.gn

Status: Fixed (was: Started)

Sign in to add a comment