Bug 161304

Summary: Web Inspector: Value checks of secondsPerPixel cause errors
Product: WebKit Reporter: Devin Rousso <hi>
Component: Web InspectorAssignee: Matt Baker <mattbaker>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[Patch] Proposed Fix
none
[Patch] Proposed Fix none

Description Devin Rousso 2016-08-28 17:14:56 PDT
WebKit/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/TimelineRecordBar.js:232:23: CONSOLE ERROR
WebKit/WebKitBuild/Release/WebInspectorUI.framework/Resources/Views/TimelineDataGridNode.js:230:23: CONSOLE ERROR

Both lines are along the lines of:
console.assert(graphDataSource.secondsPerPixel);

I'm guessing that this may be due to the fact that secondsPerPixel is initially 0, which will trigger assertions.
Comment 1 Radar WebKit Bug Importer 2016-08-28 17:15:09 PDT
<rdar://problem/28050070>
Comment 2 Matt Baker 2016-08-29 20:52:22 PDT
These are mostly the fault of NetworkTimelineView, which wasn't clearing all its cached data on recording reset, and in addition didn't check that time stamps were actually changing before doing a layout. The latter resulted in trying to refresh graphs when endTime - startTime === 0, resulting in an invalid value for secondsPerPixel.
Comment 3 Matt Baker 2016-08-29 20:58:06 PDT
Created attachment 287368 [details]
[Patch] Proposed Fix
Comment 4 BJ Burg 2016-09-01 11:29:27 PDT
Comment on attachment 287368 [details]
[Patch] Proposed Fix

This patch is missing a changelog. Ideally it would explain the sequence of events to cause this assertion and why the sequence is now different.
Comment 5 Matt Baker 2016-09-01 14:09:45 PDT
Created attachment 287675 [details]
[Patch] Proposed Fix
Comment 6 BJ Burg 2016-09-01 14:11:25 PDT
Comment on attachment 287675 [details]
[Patch] Proposed Fix

r=me, very thank you for changelog ;-)
Comment 7 Matt Baker 2016-09-01 14:17:08 PDT
(In reply to comment #6)
> Comment on attachment 287675 [details]
> [Patch] Proposed Fix
> 
> r=me, very thank you for changelog ;-)

It was already written, just got left behind :)
Comment 8 WebKit Commit Bot 2016-09-01 15:06:55 PDT
Comment on attachment 287675 [details]
[Patch] Proposed Fix

Clearing flags on attachment: 287675

Committed r205320: <http://trac.webkit.org/changeset/205320>
Comment 9 WebKit Commit Bot 2016-09-01 15:07:00 PDT
All reviewed patches have been landed.  Closing bug.