Bug 198927 - Web Inspector: REGRESSION(r245498): Timelines: CPU: discontinuities are filled in by the next record
Summary: Web Inspector: REGRESSION(r245498): Timelines: CPU: discontinuities are fille...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-17 11:42 PDT by Devin Rousso
Modified: 2019-07-01 18:18 PDT (History)
5 users (show)

See Also:


Attachments
[Image] Screenshot of Issue (965.09 KB, image/png)
2019-06-17 11:42 PDT, Devin Rousso
no flags Details
Patch (22.33 KB, patch)
2019-06-17 15:36 PDT, Devin Rousso
mattbaker: review+
Details | Formatted Diff | Diff
Patch (22.26 KB, patch)
2019-07-01 17:34 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-06-17 11:42:59 PDT
Created attachment 372260 [details]
[Image] Screenshot of Issue

# STEPS TO REPRODUCE:
1. inspect any page
2. start a timeline recording
3. stop the timeline recording
4. wait a few seconds (this creates a discontinuity)
5. start a timeline recording
 => the space between the two "ranges" is filled by the next CPU bar that's added
Comment 1 Devin Rousso 2019-06-17 15:36:33 PDT
Created attachment 372280 [details]
Patch
Comment 2 Matt Baker 2019-07-01 16:15:04 PDT
Comment on attachment 372280 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=372280&action=review

r=me, very nice!

> Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js:197
> +        if (!isNaN(this._discontinuityStartTime)) {

Nit: Above (175) the test is for `this._discontinuityStartTime` being truthy, instead of !isNaN.

> LayoutTests/inspector/unit-tests/set-utilities.html:17
> +            InspectorTest.expectTrue(set.has(key), "Set has `key`.");

I'm sure this is here to make the pre-take state more obvious, but I think it's unnecessary. The key was just added, and we aren't testing `has`.

> LayoutTests/inspector/unit-tests/set-utilities.html:21
> +            InspectorTest.expectFalse(set.take("doesNotExistKey"), "Set cannot take `doesNotExistKey`.");

Nit: `nonExistentKey` sounds better, IMO.
Comment 3 Devin Rousso 2019-07-01 17:34:12 PDT
Created attachment 373287 [details]
Patch
Comment 4 WebKit Commit Bot 2019-07-01 18:17:56 PDT
Comment on attachment 373287 [details]
Patch

Clearing flags on attachment: 373287

Committed r247033: <https://trac.webkit.org/changeset/247033>
Comment 5 WebKit Commit Bot 2019-07-01 18:17:58 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2019-07-01 18:18:20 PDT
<rdar://problem/52495442>