Title: [244354] trunk/Source/WebInspectorUI
Revision
244354
Author
[email protected]
Date
2019-04-16 12:53:09 -0700 (Tue, 16 Apr 2019)

Log 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.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (244353 => 244354)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-04-16 19:48:37 UTC (rev 244353)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-04-16 19:53:09 UTC (rev 244354)
@@ -1,5 +1,24 @@
 2019-04-16  Devin Rousso  <[email protected]>
 
+        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.
+
+2019-04-16  Devin Rousso  <[email protected]>
+
         Unprefix -webkit-sticky
         https://bugs.webkit.org/show_bug.cgi?id=196962
         <rdar://problem/40903458>

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js (244353 => 244354)


--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js	2019-04-16 19:48:37 UTC (rev 244353)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js	2019-04-16 19:53:09 UTC (rev 244354)
@@ -85,9 +85,13 @@
             if (!imageElement) {
                 imageElement = record[WI.HeapAllocationsTimelineOverviewGraph.RecordElementAssociationSymbol] = document.createElement("img");
                 imageElement.classList.add("snapshot");
-                imageElement.addEventListener("click", () => {
+                imageElement.addEventListener("click", (event) => {
                     if (record.heapSnapshot.invalid)
                         return;
+
+                    // Ensure that the container "click" listener added by `WI.TimelineOverview` isn't called.
+                    event.__timelineRecordClickEventHandled = true;
+
                     this.selectedRecord = record;
                 });
             }

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js (244353 => 244354)


--- trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js	2019-04-16 19:48:37 UTC (rev 244353)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js	2019-04-16 19:53:09 UTC (rev 244354)
@@ -153,6 +153,7 @@
 
         for (let dataGridNode of this._dataGrid.children) {
             if (dataGridNode.record === heapSnapshotTimelineRecord) {
+                dataGridNode.hidden = false;
                 dataGridNode.select();
                 break;
             }
@@ -194,7 +195,10 @@
             return items;
         }
 
-        return this._contentViewContainer.currentContentView.navigationItems;
+        if (this._contentViewContainer.currentContentView)
+            return this._contentViewContainer.currentContentView.navigationItems;
+
+        return [];
     }
 
     get selectionPathComponents()
@@ -215,7 +219,10 @@
             components.push(heapSnapshotPathComponent);
         }
 
-        return components.concat(this._contentViewContainer.currentContentView.selectionPathComponents);
+        if (this._contentViewContainer.currentContentView)
+            components = components.concat(this._contentViewContainer.currentContentView.selectionPathComponents);
+
+        return components;
     }
 
     selectRecord(record)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to