Title: [201197] branches/safari-602.1.32-branch/Source/WebInspectorUI
- Revision
- 201197
- Author
- [email protected]
- Date
- 2016-05-19 15:58:34 -0700 (Thu, 19 May 2016)
Log Message
Merge r201191. rdar://problem/26377366
Modified Paths
Diff
Modified: branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog (201196 => 201197)
--- branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog 2016-05-19 22:58:32 UTC (rev 201196)
+++ branches/safari-602.1.32-branch/Source/WebInspectorUI/ChangeLog 2016-05-19 22:58:34 UTC (rev 201197)
@@ -1,5 +1,30 @@
2016-05-19 Babak Shafiei <[email protected]>
+ Merge r201191. rdar://problem/26377366
+
+ 2016-05-19 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: Heap Snapshots taken before timeline view has a zero time do not get shown
+ https://bugs.webkit.org/show_bug.cgi?id=157923
+ <rdar://problem/26377366>
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
+ (WebInspector.HeapAllocationsTimelineDataGridNode):
+ (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
+ (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.updateTimestamp):
+ Show emDash for the timestamp if we don't yet have a zero time.
+ Update when we get a zero time.
+
+ * UserInterface/Views/HeapAllocationsTimelineView.js:
+ (WebInspector.HeapAllocationsTimelineView):
+ (WebInspector.HeapAllocationsTimelineView.prototype.layout):
+ (WebInspector.HeapAllocationsTimelineView.prototype.reset):
+ Save a list of nodes pre-zero time and update them when we get a zero time.
+
+2016-05-19 Babak Shafiei <[email protected]>
+
Merge r201183. rdar://problem/26375866
2016-05-19 Joseph Pecoraro <[email protected]>
Modified: branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineDataGridNode.js (201196 => 201197)
--- branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineDataGridNode.js 2016-05-19 22:58:32 UTC (rev 201196)
+++ branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineDataGridNode.js 2016-05-19 22:58:34 UTC (rev 201197)
@@ -34,7 +34,7 @@
this._data = {
name: this.displayName(),
- timestamp: this._record.timestamp - zeroTime,
+ timestamp: zeroTime ? this._record.timestamp - zeroTime : NaN,
size: this._record.heapSnapshot.totalSize,
};
}
@@ -60,7 +60,7 @@
return fragment;
case "timestamp":
- return Number.secondsToString(this._data.timestamp, true);
+ return isNaN(this._data.timestamp) ? emDash : Number.secondsToString(this._data.timestamp, true);
case "size":
return Number.bytesToString(this._data.size);
@@ -78,4 +78,11 @@
{
this.element.classList.remove("baseline");
}
+
+ updateTimestamp(zeroTime)
+ {
+ console.assert(isNaN(this._data.timestamp));
+ this._data.timestamp = this._record.timestamp - zeroTime;
+ this.needsRefresh();
+ }
};
Modified: branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js (201196 => 201197)
--- branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js 2016-05-19 22:58:32 UTC (rev 201196)
+++ branches/safari-602.1.32-branch/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js 2016-05-19 22:58:34 UTC (rev 201197)
@@ -87,6 +87,7 @@
WebInspector.ContentView.addEventListener(WebInspector.ContentView.Event.SelectionPathComponentsDidChange, this._contentViewSelectionPathComponentDidChange, this);
this._pendingRecords = [];
+ this._pendingZeroTimeDataGridNodes = [];
timeline.addEventListener(WebInspector.Timeline.Event.RecordAdded, this._heapAllocationsTimelineRecordAdded, this);
@@ -235,12 +236,19 @@
layout()
{
- // Wait to show records until our zeroTime has been set.
- // FIXME: Waiting until zero time causes snapshots taken without recording to not show up in the list.
- if (this._pendingRecords.length && this.zeroTime) {
+ if (this._pendingZeroTimeDataGridNodes.length && this.zeroTime) {
+ for (let dataGridNode of this._pendingZeroTimeDataGridNodes)
+ dataGridNode.updateTimestamp(this.zeroTime);
+ this._pendingZeroTimeDataGridNodes = [];
+ this._dataGrid._sort();
+ }
+
+ if (this._pendingRecords.length) {
for (let heapAllocationsTimelineRecord of this._pendingRecords) {
let dataGridNode = new WebInspector.HeapAllocationsTimelineDataGridNode(heapAllocationsTimelineRecord, this.zeroTime, this);
this._dataGrid.addRowInSortOrder(null, dataGridNode);
+ if (!this.zeroTime)
+ this._pendingZeroTimeDataGridNodes.push(dataGridNode);
}
this._pendingRecords = [];
@@ -256,6 +264,7 @@
this.showHeapSnapshotList();
this._pendingRecords = [];
+ this._pendingZeroTimeDataGridNodes = [];
this._updateCompareHeapSnapshotButton();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes