New issue
Advanced search Search tips

Issue 718612 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 717748



Sign in to add a comment

Support for transfer navigations in data use ascriber

Project Member Reported by rajendrant@chromium.org, May 4 2017

Issue description

When a page navigates from a.com to b.com, the navigation reuses the same render frame in ReadyToCommitMainFrameNavigation(). Later the navigation transfers and RenderFrameHostChanged() gets called with the new render frame. Finally DidFinishNavigation() is called with new render frame.

ReadyToCommitMainFrameNavigation() still attributes the data use of the new navigation to datause of old render frame.

One solution is to ascribe the navigation to its render-frame only in DidFinishNavigation().

 
Transfer navigations are not expected in PlzNavigate. But the above solution works in both cases.

Comment 2 by bengr@chromium.org, May 5 2017

What are transfer navigations?
Navigations that transfer from one RenderFrameHost to another, during the navigation commit. Following is an example:

Step 1: Navigate to a.com
1 RenderFrame rf_a is created
2 Navigation nav_a starts (DidStartNavigation)
3 nav_a is ready to commit with rf_a (ReadyToCommitNavigation)
4 nav_a commits with rf_a (DidFinishNavigation)

Step 2: Navigate to b.com in the same tab
1 RenderFrame rf_b is created
2 Navigation nav_b starts
3 nav_b is ready to commit with rf_a
4 The webcontents changes the renderframehost rf_a to rf_b (RenderFrameHostChanged)
5 rf_a is deleted
6 nav_b commits with rf_a


The current code attributes data use of nav_b with rf_a (step 2.3) which is wrong.
To support transfer navigations, the attribution should happen at step 2.6.

Comment 4 by bengr@chromium.org, May 8 2017

Gotcha. Thanks.
Blocking: 717748

Comment 7 by bengr@chromium.org, May 18 2017

Status: Started (was: Assigned)

Comment 8 Deleted

Project Member

Comment 9 by bugdroid1@chromium.org, May 23 2017

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

commit 54819c15bc373470597bb574895816174e633c72
Author: rajendrant <rajendrant@chromium.org>
Date: Tue May 23 08:34:13 2017

Support for transfer navigations in data use ascriber

Before the navigation commits, old mainframe could be reused in ReadyToCommit. After that
new mainframe may be created and the navigation transfers from the old mainframe to the new.
To handle this case, ascribing the datause should happen after navigation commits at
DidFinishNavigation. The global request ID of the navigation should be copied from
ReadyToCommit to DidFinishNavigation. This is only applicable for non PlzNavigate.

BUG= 718612 

Review-Url: https://codereview.chromium.org/2875263003
Cr-Commit-Position: refs/heads/master@{#473837}

[modify] https://crrev.com/54819c15bc373470597bb574895816174e633c72/chrome/browser/data_use_measurement/chrome_data_use_ascriber.cc
[modify] https://crrev.com/54819c15bc373470597bb574895816174e633c72/chrome/browser/data_use_measurement/chrome_data_use_ascriber.h
[modify] https://crrev.com/54819c15bc373470597bb574895816174e633c72/chrome/browser/data_use_measurement/chrome_data_use_ascriber_service.cc
[modify] https://crrev.com/54819c15bc373470597bb574895816174e633c72/chrome/browser/data_use_measurement/chrome_data_use_ascriber_unittest.cc

Comment 10 Deleted

Comment 11 by bengr@chromium.org, May 23 2017

Labels: M-61
What's left to do before we mark this issue fixed?
Cc: rajendrant@chromium.org ryansturm@chromium.org
 Issue 723088  has been merged into this issue.
Status: Fixed (was: Started)

Sign in to add a comment