Bug 126760 - Web Inspector: Resource durations are sometimes years long
Summary: Web Inspector: Resource durations are sometimes years long
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-10 10:31 PST by Timothy Hatcher
Modified: 2014-01-10 13:27 PST (History)
5 users (show)

See Also:


Attachments
Patch (2.71 KB, patch)
2014-01-10 10:42 PST, Timothy Hatcher
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.