Changeset 244265 in webkit
- Timestamp:
- Apr 15, 2019, 10:23:26 AM (7 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
UserInterface/Views/HeapAllocationsTimelineView.js (modified) (6 diffs)
-
UserInterface/Views/TimelineRecordingContentView.js (modified) (2 diffs)
-
UserInterface/Views/TimelineView.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r244264 r244265 1 2019-04-15 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: REGRESSION: Heap: snapshots taken manually don't appear in the list 4 https://bugs.webkit.org/show_bug.cgi?id=196900 5 <rdar://problem/49880278> 6 7 Reviewed by Timothy Hatcher. 8 9 * UserInterface/Views/HeapAllocationsTimelineView.js: 10 (WI.HeapAllocationsTimelineView): 11 (WI.HeapAllocationsTimelineView.prototype.layout): 12 (WI.HeapAllocationsTimelineView.prototype._importButtonNavigationItemClicked): 13 (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked): 14 Drive-by: only show heap snapshots for the selected range. 15 16 * UserInterface/Views/TimelineView.js: 17 * UserInterface/Views/TimelineRecordingContentView.js: 18 (WI.TimelineRecordingContentView): 19 (WI.TimelineRecordingContentView.prototype._handleTimelineViewNeedsEntireSelectedRange): Added. 20 Drive-by: taking (or importing) a heap snapshot should select the entire range so that the 21 new record will appear in the list of heap snapshots. 22 1 23 2019-04-15 Devin Rousso <drousso@apple.com> 2 24 -
trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js
r243213 r244265 94 94 this._dataGrid.createSettings("heap-allocations-timeline-view"); 95 95 this._dataGrid.addEventListener(WI.DataGrid.Event.SelectedNodeChanged, this._dataGridNodeSelected, this); 96 96 this.setupDataGrid(this._dataGrid); 97 97 this.addSubview(this._dataGrid); 98 98 … … 263 263 layout() 264 264 { 265 if (this._pendingRecords.length && this.zeroTime) { 266 for (let heapAllocationsTimelineRecord of this._pendingRecords) { 267 this._dataGrid.addRowInSortOrder(new WI.HeapAllocationsTimelineDataGridNode(heapAllocationsTimelineRecord, { 268 graphDataSource: this, 269 heapAllocationsView: this, 270 })); 271 } 272 273 this._pendingRecords = []; 274 this._updateCompareHeapSnapshotButton(); 275 } 265 super.layout(); 266 267 if (!this._pendingRecords.length) 268 return; 269 270 for (let heapAllocationsTimelineRecord of this._pendingRecords) { 271 this._dataGrid.addRowInSortOrder(new WI.HeapAllocationsTimelineDataGridNode(heapAllocationsTimelineRecord, { 272 graphDataSource: this, 273 heapAllocationsView: this, 274 })); 275 } 276 277 this._pendingRecords = []; 278 this._updateCompareHeapSnapshotButton(); 276 279 } 277 280 … … 381 384 _importButtonNavigationItemClicked() 382 385 { 383 WI.FileUtilities.importText( function(result){386 WI.FileUtilities.importText((result) => { 384 387 let snapshotStringData = result.text; 385 388 let workerProxy = WI.HeapSnapshotWorkerProxy.singleton(); … … 389 392 const timestamp = NaN; 390 393 WI.timelineManager.heapSnapshotAdded(timestamp, snapshot); 394 this.dispatchEventToListeners(WI.TimelineView.Event.NeedsEntireSelectedRange); 391 395 }); 392 396 }); … … 395 399 _takeHeapSnapshotClicked() 396 400 { 397 HeapAgent.snapshot( function(error, timestamp, snapshotStringData){401 HeapAgent.snapshot((error, timestamp, snapshotStringData) => { 398 402 let workerProxy = WI.HeapSnapshotWorkerProxy.singleton(); 399 403 workerProxy.createSnapshot(snapshotStringData, ({objectId, snapshot: serializedSnapshot}) => { … … 401 405 snapshot.snapshotStringData = snapshotStringData; 402 406 WI.timelineManager.heapSnapshotAdded(timestamp, snapshot); 407 this.dispatchEventToListeners(WI.TimelineView.Event.NeedsEntireSelectedRange); 403 408 }); 404 409 }); -
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineRecordingContentView.js
r244195 r244265 115 115 WI.TimelineView.addEventListener(WI.TimelineView.Event.ScannerShow, this._handleTimelineViewScannerShow, this); 116 116 WI.TimelineView.addEventListener(WI.TimelineView.Event.ScannerHide, this._handleTimelineViewScannerHide, this); 117 WI.TimelineView.addEventListener(WI.TimelineView.Event.NeedsEntireSelectedRange, this._handleTimelineViewNeedsEntireSelectedRange, this); 117 118 118 119 WI.notifications.addEventListener(WI.Notification.VisibilityStateDidChange, this._inspectorVisibilityStateChanged, this); … … 934 935 } 935 936 937 _handleTimelineViewNeedsEntireSelectedRange(event) 938 { 939 if (!this.visible) 940 return; 941 942 this._timelineOverview.timelineRuler.selectEntireRange(); 943 } 944 936 945 _updateProgressView() 937 946 { -
trunk/Source/WebInspectorUI/UserInterface/Views/TimelineView.js
r243024 r244265 346 346 ScannerShow: "timeline-view-scanner-show", 347 347 ScannerHide: "timeline-view-scanner-hide", 348 NeedsEntireSelectedRange: "timeline-view-needs-entire-selected-range", 348 349 };
Note:
See TracChangeset
for help on using the changeset viewer.