Changeset 244354 in webkit


Ignore:
Timestamp:
Apr 16, 2019 12:53:09 PM (5 years ago)
Author:
Devin Rousso
Message:

Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'this._contentViewContainer.currentContentView.selectionPathComponents')
https://bugs.webkit.org/show_bug.cgi?id=196936
<rdar://problem/49917789>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/HeapAllocationsTimelineView.js:

(WI.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WI.HeapAllocationsTimelineView.prototype.get navigationItems):
(WI.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
Drive-by: when selecting a record, force it to be visible before selecting it, as otherwise
the selection events won't be fired.

  • UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:

(WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
Drive-by: ensure that clicking on a [S] heap snapshot record icon actually selects the record.

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r244353 r244354  
     12019-04-16  Devin Rousso  <drousso@apple.com>
     2
     3        Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'this._contentViewContainer.currentContentView.selectionPathComponents')
     4        https://bugs.webkit.org/show_bug.cgi?id=196936
     5        <rdar://problem/49917789>
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * UserInterface/Views/HeapAllocationsTimelineView.js:
     10        (WI.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
     11        (WI.HeapAllocationsTimelineView.prototype.get navigationItems):
     12        (WI.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
     13        Drive-by: when selecting a record, force it to be visible before selecting it, as otherwise
     14        the selection events won't be fired.
     15
     16        * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
     17        (WI.HeapAllocationsTimelineOverviewGraph.prototype.layout):
     18        Drive-by: ensure that clicking on a [S] heap snapshot record icon actually selects the record.
     19
    1202019-04-16  Devin Rousso  <drousso@apple.com>
    221
  • trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js

    r241219 r244354  
    8686                imageElement = record[WI.HeapAllocationsTimelineOverviewGraph.RecordElementAssociationSymbol] = document.createElement("img");
    8787                imageElement.classList.add("snapshot");
    88                 imageElement.addEventListener("click", () => {
     88                imageElement.addEventListener("click", (event) => {
    8989                    if (record.heapSnapshot.invalid)
    9090                        return;
     91
     92                    // Ensure that the container "click" listener added by `WI.TimelineOverview` isn't called.
     93                    event.__timelineRecordClickEventHandled = true;
     94
    9195                    this.selectedRecord = record;
    9296                });
  • trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js

    r244265 r244354  
    154154        for (let dataGridNode of this._dataGrid.children) {
    155155            if (dataGridNode.record === heapSnapshotTimelineRecord) {
     156                dataGridNode.hidden = false;
    156157                dataGridNode.select();
    157158                break;
     
    195196        }
    196197
    197         return this._contentViewContainer.currentContentView.navigationItems;
     198        if (this._contentViewContainer.currentContentView)
     199            return this._contentViewContainer.currentContentView.navigationItems;
     200
     201        return [];
    198202    }
    199203
     
    216220        }
    217221
    218         return components.concat(this._contentViewContainer.currentContentView.selectionPathComponents);
     222        if (this._contentViewContainer.currentContentView)
     223            components = components.concat(this._contentViewContainer.currentContentView.selectionPathComponents);
     224
     225        return components;
    219226    }
    220227
Note: See TracChangeset for help on using the changeset viewer.