Commit 49a048bd authored by Sigurdur Asgeirsson's avatar Sigurdur Asgeirsson Committed by Commit Bot

RC: Tiny cleanup in TabLoadTracker.

Bug: 854598
Change-Id: I457e8940a4ad5ff4aa89cfae4415f0addd1e6a64
Reviewed-on: https://chromium-review.googlesource.com/1118621
Commit-Queue: François Doray <fdoray@chromium.org>
Reviewed-by: default avatarFrançois Doray <fdoray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571171}
parent 89626491
...@@ -164,11 +164,11 @@ void TabLoadTracker::DidFailLoad(content::WebContents* web_contents) { ...@@ -164,11 +164,11 @@ void TabLoadTracker::DidFailLoad(content::WebContents* web_contents) {
void TabLoadTracker::OnPageAlmostIdle(content::WebContents* web_contents) { void TabLoadTracker::OnPageAlmostIdle(content::WebContents* web_contents) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
DCHECK(resource_coordinator::IsPageAlmostIdleSignalEnabled()); DCHECK(resource_coordinator::IsPageAlmostIdleSignalEnabled());
// PageAlmostIdle signals can be arbitrarily delayed as they are asynchronous. // TabManager::ResourceCoordinatorSignalObserver filters late notifications
// As such, they can arrive after the web contents in question no longer // so here we can assume the event pertains to a live web_contents and
// exists. // its most recent navigation.
if (!base::ContainsKey(tabs_, web_contents)) DCHECK(base::ContainsKey(tabs_, web_contents));
return;
MaybeTransitionToLoaded(web_contents); MaybeTransitionToLoaded(web_contents);
} }
......
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