summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authornasko@chromium.org <nasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-26 23:43:32 +0000
committernasko@chromium.org <nasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-26 23:43:32 +0000
commit64214381d88ffd3a77b08dcc1619d0e47393212f (patch)
tree24fcc7376ed0afdbe59d7287f42ee15a43356a15 /chrome/renderer
parent2746df93f815c4d054f2197752879acd5b9327db (diff)
downloadchromium_src-64214381d88ffd3a77b08dcc1619d0e47393212f.zip
chromium_src-64214381d88ffd3a77b08dcc1619d0e47393212f.tar.gz
chromium_src-64214381d88ffd3a77b08dcc1619d0e47393212f.tar.bz2
Avoid logging page load time histogram data if no requestStart timing data is present.
BUG=172479 Review URL: https://chromiumcodereview.appspot.com/14471038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196884 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/page_load_histograms.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/renderer/page_load_histograms.cc b/chrome/renderer/page_load_histograms.cc
index f5b49fd..912516c 100644
--- a/chrome/renderer/page_load_histograms.cc
+++ b/chrome/renderer/page_load_histograms.cc
@@ -68,8 +68,17 @@ void DumpPerformanceTiming(const WebPerformance& performance,
Time begin = (request.is_null() ? navigation_start : request_start);
DCHECK(!navigation_start.is_null());
- DCHECK(!request_start.is_null());
- DCHECK(!response_start.is_null());
+
+ // It is possible for a document to have navigation_start time, but no
+ // request_start. An example is doing a window.open, which synchronously
+ // loads "about:blank", then using document.write add a meta http-equiv
+ // refresh tag, which causes a navigation. In such case, we will arrive at
+ // this function with no request/response timing data and identical load
+ // start/end values. Avoid logging this case, as it doesn't add any
+ // meaningful information to the histogram.
+ if (request_start.is_null())
+ return;
+
// TODO(dominich): Investigate conditions under which |load_event_start| and
// |load_event_end| may be NULL as in the non-PT_ case below. Examples in
// http://crbug.com/112006.