Bug 169852 - Web Inspector: Clicking on Clear Network Items icon throws an exception if timing popover is visible
Summary: Web Inspector: Clicking on Clear Network Items icon throws an exception if ti...
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: Nikita Vasilyev
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-03-18 14:43 PDT by Nikita Vasilyev
Modified: 2017-03-20 18:01 PDT (History)
3 users (show)

See Also:


Attachments
Patch (2.02 KB, patch)
2017-03-18 14:55 PDT, Nikita Vasilyev
joepeck: review+
Details | Formatted Diff | Diff
Patch (1.97 KB, patch)
2017-03-20 17:20 PDT, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2017-03-18 14:43:30 PDT
Uncaught Exceptions:
 - TypeError: null is not an object (evaluating 'this.dataGrid._popover') (at ResourceTimelineDataGridNode.js:424:82)
    ? @ ResourceTimelineDataGridNode.js:424:82

* STEPS TO REPRODUCE
1. In Web Inspector, open Network tab
2. Open http://webkit.org/
3. Hover over the timing bar at the right side of the content view to show the timing information popover.
4. Quickly click on the Clear Network Items icon.
Comment 1 Radar WebKit Bug Importer 2017-03-18 14:44:44 PDT
<rdar://problem/31132652>
Comment 2 Nikita Vasilyev 2017-03-18 14:55:38 PDT
Created attachment 304879 [details]
Patch
Comment 3 Joseph Pecoraro 2017-03-20 16:48:02 PDT
Comment on attachment 304879 [details]
Patch

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

r=me

> Source/WebInspectorUI/UserInterface/Views/ResourceTimelineDataGridNode.js:430
> +            let dismissPopover = () => {
> +                if (this.dataGrid)
> +                    this.dataGrid._popover.dismiss();
> +            };
> +
> +            this.dataGrid._dismissPopoverTimeout = setTimeout(dismissPopover, WebInspector.ResourceTimelineDataGridNode.DelayedPopoverDismissalTimeout);

Style: We normally inline arrow functions used in only one place:

    this.dataGrid._dismissPopoverTimeout = setTimeout(() => {
        if (this.dataGrid)
            this.dataGrid._popover.dismiss();
    }, WebInspector.ResourceTimelineDataGridNode.DelayedPopoverDismissalTimeout);
Comment 4 Nikita Vasilyev 2017-03-20 17:20:24 PDT
Created attachment 304974 [details]
Patch
Comment 5 WebKit Commit Bot 2017-03-20 18:01:25 PDT
Comment on attachment 304974 [details]
Patch

Clearing flags on attachment: 304974

Committed r214199: <http://trac.webkit.org/changeset/214199>
Comment 6 WebKit Commit Bot 2017-03-20 18:01:29 PDT
All reviewed patches have been landed.  Closing bug.