Changeset 201949 in webkit


Ignore:
Timestamp:
Jun 10, 2016 4:05:52 PM (8 years ago)
Author:
Matt Baker
Message:

Web Inspector: heap snapshot comparison view shows nothing if later snapshot is chosen first
https://bugs.webkit.org/show_bug.cgi?id=158584
<rdar://problem/26727849>

Reviewed by Timothy Hatcher.

ALways compare the the later snapshot to the earlier snapshot,
regardless of selection order.

  • UserInterface/Views/HeapAllocationsTimelineView.js:

(WebInspector.HeapAllocationsTimelineView):
(WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
Swap shapshots if the first has a greater identifier than the second.
Drive-by cleanup: null out _baselineDataGridNode since it isn't used
after the comparison completes.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r201937 r201949  
     12016-06-10  Matt Baker  <mattbaker@apple.com>
     2
     3        Web Inspector: heap snapshot comparison view shows nothing if later snapshot is chosen first
     4        https://bugs.webkit.org/show_bug.cgi?id=158584
     5        <rdar://problem/26727849>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        ALways compare the the later snapshot to the earlier snapshot,
     10        regardless of selection order.
     11
     12        * UserInterface/Views/HeapAllocationsTimelineView.js:
     13        (WebInspector.HeapAllocationsTimelineView):
     14        (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
     15        Swap shapshots if the first has a greater identifier than the second.
     16        Drive-by cleanup: null out `_baselineDataGridNode` since it isn't used
     17        after the comparison completes.
     18
    1192016-06-10  Matt Baker  <mattbaker@apple.com>
    220
  • trunk/Source/WebInspectorUI/UserInterface/Views/HeapAllocationsTimelineView.js

    r201191 r201949  
    418418        let snapshot1 = this._baselineHeapSnapshotTimelineRecord.heapSnapshot;
    419419        let snapshot2 = heapAllocationsTimelineRecord.heapSnapshot;
     420        if (snapshot1.identifier > snapshot2.identifier)
     421            [snapshot1, snapshot2] = [snapshot2, snapshot1];
     422
    420423        let workerProxy = WebInspector.HeapSnapshotWorkerProxy.singleton();
    421424        workerProxy.createSnapshotDiff(snapshot1.proxyObjectId, snapshot2.proxyObjectId, ({objectId, snapshotDiff: serializedSnapshotDiff}) => {
     
    425428
    426429        this._baselineDataGridNode.clearBaseline();
     430        this._baselineDataGridNode = null;
    427431        this._selectingComparisonHeapSnapshots = false;
    428432        this._compareHeapSnapshotsButtonItem.activated = false;
Note: See TracChangeset for help on using the changeset viewer.