Bug 126760

Summary: Web Inspector: Resource durations are sometimes years long
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web InspectorAssignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Timothy Hatcher 2014-01-10 10:31:33 PST
Lets go back 2 years ago:

http://trac.webkit.org/changeset/102961/trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp

A chromium engineer changed InspectorInstrumentation::didFinishLoadingImpl to expect monotonic time instead of wall clock time. The argument was renamed to monotonicFinishTime. The header was never changed (still says finishTime instead of monotonicFinishTime) and neither was any other port changed to pass the new expected time format.

Fast forward to today. Sigh.

This causes end times to essentially double because convertMonotonicTimeToDocumentTime will add the finish time (wall clock time) to the document start time (also wall clock time), minus a reference monotonic time (a smaller number than wall clock time). Most call sites pass 0 for finishTime, so this just caused currentTime to be used later down the line.

Thanks Google.
Comment 1 Radar WebKit Bug Importer 2014-01-10 10:32:11 PST
<rdar://problem/15793435>
Comment 2 Timothy Hatcher 2014-01-10 10:42:46 PST
Created attachment 220856 [details]
Patch
Comment 3 Joseph Pecoraro 2014-01-10 10:46:34 PST
Comment on attachment 220856 [details]
Patch

r=me
Comment 4 WebKit Commit Bot 2014-01-10 13:27:44 PST
Comment on attachment 220856 [details]
Patch

Clearing flags on attachment: 220856

Committed r161670: <http://trac.webkit.org/changeset/161670>
Comment 5 WebKit Commit Bot 2014-01-10 13:27:46 PST
All reviewed patches have been landed.  Closing bug.