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

Issue 384503009: Amend sanitization of browser-side navigationStart override. (Closed)

Created:
6 years, 5 months ago by ppi
Modified:
6 years, 5 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, nasko+codewatch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Amend sanitization of browser-side navigationStart override. When setting the navigationStart recorded on the browser side for browser-initiated navigations, we need to ensure the time is lower than the time of starting the load on the renderer side. Otherwise with heavy clock differences between processes and particularly fast navigation start-ups we could end up pushing the navigationStart *forward* and hitting an assert that is being deployed in https://codereview.chromium.org/379873002/ . BUG=376004 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=283761

Patch Set 1 #

Patch Set 2 : Rebase. #

Patch Set 3 : Rebase. #

Patch Set 4 : Add a browsertest for the navigationStart override. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -4 lines) Patch
M content/renderer/render_frame_impl.cc View 1 2 2 chunks +8 lines, -4 lines 2 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 3 2 chunks +47 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
ppi
Hi John, could you take a look?
6 years, 5 months ago (2014-07-10 14:59:45 UTC) #1
ppi
Ah, John is ooo. Jochen, could you take a look?
6 years, 5 months ago (2014-07-11 09:32:40 UTC) #2
jochen (gone - plz use gerrit)
is it possible to write a test for this?
6 years, 5 months ago (2014-07-14 11:17:05 UTC) #3
ppi
Kind of..., sure. It is a messy case where we calculate and set the override ...
6 years, 5 months ago (2014-07-16 17:34:49 UTC) #4
jochen (gone - plz use gerrit)
lgtm, thx
6 years, 5 months ago (2014-07-17 09:49:31 UTC) #5
ppi
Thanks!
6 years, 5 months ago (2014-07-17 09:57:28 UTC) #6
ppi
The CQ bit was checked by ppi@chromium.org
6 years, 5 months ago (2014-07-17 09:57:31 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ppi@chromium.org/384503009/80001
6 years, 5 months ago (2014-07-17 09:59:22 UTC) #8
commit-bot: I haz the power
Change committed as 283761
6 years, 5 months ago (2014-07-17 12:31:12 UTC) #9
pasko
https://codereview.chromium.org/384503009/diff/80001/content/renderer/render_frame_impl.cc File content/renderer/render_frame_impl.cc (right): https://codereview.chromium.org/384503009/diff/80001/content/renderer/render_frame_impl.cc#newcode904 content/renderer/render_frame_impl.cc:904: base::TimeTicks navigation_start = std::min( This min() could be a ...
6 years, 5 months ago (2014-07-17 13:18:00 UTC) #10
ppi
6 years, 5 months ago (2014-07-17 13:27:43 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/384503009/diff/80001/content/renderer/render_...
File content/renderer/render_frame_impl.cc (right):

https://codereview.chromium.org/384503009/diff/80001/content/renderer/render_...
content/renderer/render_frame_impl.cc:904: base::TimeTicks navigation_start =
std::min(
On 2014/07/17 13:18:00, pasko wrote:
> This min() could be a reason of bi-modal distribution in navigation metrics,
> which makes it quite hard to analyse the metric with statistical methods.
> 
> If we record the time upon sending and receiving the IPC in the corresponding
> processes as |browser_sent_navigation| and |renderer_received_navigation|,
then
> we can account for this offset in renderer-side navigation timings.
> 
> Proposal:
> 
> navigation_start = renderer_received_navigation - (browser_sent_navigation -
> params.browser_navigation_start)
> 
> This way we will be discounting for the IPC travel time, which is not ideal,
but
> I like thinking that IPC travel time depends more on how the OS behaves and is
> somewhat out of our control. I have no better way in mind for synchronizing
time
> across processes, but this min() time feels confusing, non-monotonic and
> <censored>.

This is an excellent idea, also solving the problem of big clock differences
between processes on Windows. Let me file a bug and let's see what the other
people think.

Thanks!!

Powered by Google App Engine
This is Rietveld 408576698