From 8aca1e713f0f6e2b27b6d113bf12d82617afc4f5 Mon Sep 17 00:00:00 2001 From: "vsevik@chromium.org" Date: Thu, 14 Apr 2011 10:17:27 +0000 Subject: Pass null timing to webkit when no such data is available. DumpRenderTree does not collect timing information and we should pass null timing value to WebKit in this case. BUG=None TEST=None Review URL: http://codereview.chromium.org/6823006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81562 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/glue/weburlloader_impl.cc | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'webkit/glue') diff --git a/webkit/glue/weburlloader_impl.cc b/webkit/glue/weburlloader_impl.cc index 96042dc..0152e1d 100644 --- a/webkit/glue/weburlloader_impl.cc +++ b/webkit/glue/weburlloader_impl.cc @@ -198,22 +198,24 @@ void PopulateURLResponse( response->setConnectionReused(info.connection_reused); response->setDownloadFilePath(FilePathToWebString(info.download_file_path)); - WebURLLoadTiming timing; - timing.initialize(); const ResourceLoadTimingInfo& timing_info = info.load_timing; - timing.setRequestTime(timing_info.base_time.ToDoubleT()); - timing.setProxyStart(timing_info.proxy_start); - timing.setProxyEnd(timing_info.proxy_end); - timing.setDNSStart(timing_info.dns_start); - timing.setDNSEnd(timing_info.dns_end); - timing.setConnectStart(timing_info.connect_start); - timing.setConnectEnd(timing_info.connect_end); - timing.setSSLStart(timing_info.ssl_start); - timing.setSSLEnd(timing_info.ssl_end); - timing.setSendStart(timing_info.send_start); - timing.setSendEnd(timing_info.send_end); - timing.setReceiveHeadersEnd(timing_info.receive_headers_end); - response->setLoadTiming(timing); + if (!timing_info.base_time.is_null()) { + WebURLLoadTiming timing; + timing.initialize(); + timing.setRequestTime(timing_info.base_time.ToDoubleT()); + timing.setProxyStart(timing_info.proxy_start); + timing.setProxyEnd(timing_info.proxy_end); + timing.setDNSStart(timing_info.dns_start); + timing.setDNSEnd(timing_info.dns_end); + timing.setConnectStart(timing_info.connect_start); + timing.setConnectEnd(timing_info.connect_end); + timing.setSSLStart(timing_info.ssl_start); + timing.setSSLEnd(timing_info.ssl_end); + timing.setSendStart(timing_info.send_start); + timing.setSendEnd(timing_info.send_end); + timing.setReceiveHeadersEnd(timing_info.receive_headers_end); + response->setLoadTiming(timing); + } if (info.devtools_info.get()) { WebHTTPLoadInfo load_info; -- cgit v1.1