Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(576)

Issue 2789783003: Fix incorrect assert in PageLoadTracker. (Closed)

Created:
3 years, 8 months ago by jam
Modified:
3 years, 8 months ago
Reviewers:
Bryan McQuade
CC:
chromium-reviews, csharrison+watch_chromium.org, loading-reviews+metrics_chromium.org, speed-metrics-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix incorrect assert in PageLoadTracker. PageLoadTracker::~PageLoadTracker was setting page_end_time_ to Now() if it was null. However, if page_end_reason_ wasn't END_NONE then an assert will file a few lines down when ComputePageLoadExtraInfo is called. This happened with PlzNavigate after r460581 landed, which sped up browser-initiated loads when there was no beforeunload handler. This fixes IsolatedAppTest.CrossProcessClientRedirect. BUG=651844

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -3 lines) Patch
M chrome/browser/extensions/isolated_app_browsertest.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/page_load_metrics/page_load_tracker.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 16 (9 generated)
jam
3 years, 8 months ago (2017-03-31 03:40:35 UTC) #8
Bryan McQuade
On 2017/03/31 at 03:40:35, jam wrote: > Thank you! It sounds like the issue here ...
3 years, 8 months ago (2017-03-31 17:51:33 UTC) #11
Bryan McQuade
On 2017/03/31 at 17:51:33, Bryan McQuade wrote: > On 2017/03/31 at 03:40:35, jam wrote: > ...
3 years, 8 months ago (2017-03-31 18:07:44 UTC) #12
jam
On 2017/03/31 17:51:33, Bryan McQuade wrote: > On 2017/03/31 at 03:40:35, jam wrote: > > ...
3 years, 8 months ago (2017-03-31 19:17:02 UTC) #13
Bryan McQuade
On 2017/03/31 at 19:17:02, jam wrote: > On 2017/03/31 17:51:33, Bryan McQuade wrote: > > ...
3 years, 8 months ago (2017-04-03 17:08:55 UTC) #14
Bryan McQuade
On 2017/04/03 at 17:08:55, Bryan McQuade wrote: > On 2017/03/31 at 19:17:02, jam wrote: > ...
3 years, 8 months ago (2017-04-04 16:08:28 UTC) #15
Bryan McQuade
3 years, 8 months ago (2017-04-10 13:38:27 UTC) #16
On 2017/04/04 at 16:08:28, Bryan McQuade wrote:
> On 2017/04/03 at 17:08:55, Bryan McQuade wrote:
> > On 2017/03/31 at 19:17:02, jam wrote:
> > > On 2017/03/31 17:51:33, Bryan McQuade wrote:
> > > > On 2017/03/31 at 03:40:35, jam wrote:
> > > > > 
> > > > 
> > > > Thank you!
> > > > 
> > > > It sounds like the issue here is that under some cases, in OOPIF, we see
pages
> > > > where UpdatePageEndInternal is invoked with a timestamp before
navigation start,
> > > > which resets the end time and reason, and then in the destructor we set
> > > > page_end_time_ to a timestamp which causes the DCHECK to fire in
> > > > ComputePageLoadExtraInfo. jam does that sound right?
> > > 
> > > Yep
> > > it should be possible to repro this pretty consistently locally.
> > > 
> > > > 
> > > > If so, I do think we need to fix this, but I'm not yet sure what the
right fix
> > > > is. I'm going to spend some time understanding
> > > > 1. why we sometimes get a page end time *before* nav start (seems like a
bug
> > > > somewhere)
> > > > 2. what we should be doing differently in the destructor (likely setting
> > > > page_end_reason_ to END_OTHER when we set the page_end_time_
> > > > 
> > > > Thanks again for digging into this.
> > > > -bryan
> > 
> > Just a quick update here: I'm working on a slightly different fix for this -
I hope to have it in review tomorrow.
> 
> FYI the alternative fix can be found here:
https://codereview.chromium.org/2794603002 - I'm waiting to figure out how to
repro the original flake before I move forward, so I can be certain my fix
addresses the issue. Please see my last comment in the bug for this issue for
questions on how to properly repro. Thanks!

The alternative fix for this has been landed, so I'm going to close this out,
thanks!

Powered by Google App Engine
This is Rietveld 408576698