Index: Source/core/loader/DocumentLoadTiming.cpp |
diff --git a/Source/core/loader/DocumentLoadTiming.cpp b/Source/core/loader/DocumentLoadTiming.cpp |
index 6204ca613575cfa5214b40a644c225e5ac9384de..3d7edd2a1d51f8d0da6532b220d9df9f677c5750 100644 |
--- a/Source/core/loader/DocumentLoadTiming.cpp |
+++ b/Source/core/loader/DocumentLoadTiming.cpp |
@@ -74,7 +74,18 @@ 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) |