Commit 9395f31a authored by pkasting@chromium.org's avatar pkasting@chromium.org

Revert of Fix Performance::now() for browser navigations....

Revert of Fix Performance::now() for browser navigations. (https://codereview.chromium.org/379873002/)

Reason for revert:
Broke org.chromium.android_webview.test.AwContentsClientShouldOverrideUrlLoadingTest#testDoubleNavigateDoesNotSuppressInitialNavigate on the Android test bots.  See http://crbug.com/395817 .

Original issue's description:
> Fix Performance::now() for browser navigations.
> 
> Performance::now() is defined[1] as number of milliseconds since
> navigationStart. It works correctly for renderer-initiated navigations,
> but for browser-initiated ones we override the navigationStart with the
> recording taken on the browser side and this is not represented in
> Performace::now().
> 
> Among other reasons to be sad about this, this bug makes Chromium's
> pagecyclers not represent the renderer initialization times in their
> plt measurements.
> 
> This patch fixes this by adjusting the fields that are supposed to
> correspond to navigationStart when we change navigationStart from the
> embedder.
> 
> [1] http://www.w3.org/TR/hr-time/#dom-performance-now
> 
> BUG=376004
> 
> Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178558

TBR=clamy@chromium.org,japhet@chromium.org,tonyg@chromium.org,ppi@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=376004

Review URL: https://codereview.chromium.org/409723002

git-svn-id: svn://svn.chromium.org/blink/trunk@178601 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 76ceb843
......@@ -74,18 +74,7 @@ void DocumentLoadTiming::markNavigationStart()
void DocumentLoadTiming::setNavigationStart(double navigationStart)
{
ASSERT(m_referenceMonotonicTime && m_referenceWallTime);
// This should be used only to indicate that the navigation started in the
// embedder before the renderer was created.
ASSERT(navigationStart <= m_navigationStart);
m_navigationStart = navigationStart;
// |m_referenceMonotonicTime| and |m_referenceWallTime| represent
// navigationStart. When the embedder sets navigationStart (because the
// navigation started earlied on the browser side), we need to adjust these
// as well.
m_referenceWallTime = monotonicTimeToPseudoWallTime(navigationStart);
m_referenceMonotonicTime = navigationStart;
}
void DocumentLoadTiming::addRedirect(const KURL& redirectingUrl, const KURL& redirectedUrl)
......
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