Web Inspector: REGRESSION(r244195): Timelines: unable to take heap snapshot
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2019 22:56:40 +0000 (22:56 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 11 Apr 2019 22:56:40 +0000 (22:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196832
<rdar://problem/49828862>

Reviewed by Simon Fraser.

* UserInterface/Controllers/TimelineManager.js:
(WI.TimelineManager.prototype.heapSnapshotAdded):
(WI.TimelineManager.prototype._addRecord):
Heap snapshots can be taken outside of a timeline recording, so remove the early return (and
assertion) that checks for an active recording before adding the heap snapshot record.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244199 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js

index 8a103ae..9383551 100644 (file)
@@ -1,5 +1,19 @@
 2019-04-11  Devin Rousso  <drousso@apple.com>
 
+        Web Inspector: REGRESSION(r244195): Timelines: unable to take heap snapshot
+        https://bugs.webkit.org/show_bug.cgi?id=196832
+        <rdar://problem/49828862>
+
+        Reviewed by Simon Fraser.
+
+        * UserInterface/Controllers/TimelineManager.js:
+        (WI.TimelineManager.prototype.heapSnapshotAdded):
+        (WI.TimelineManager.prototype._addRecord):
+        Heap snapshots can be taken outside of a timeline recording, so remove the early return (and
+        assertion) that checks for an active recording before adding the heap snapshot record.
+
+2019-04-11  Devin Rousso  <drousso@apple.com>
+
         Web Inspector: Timelines: can't reliably stop/start a recording
         https://bugs.webkit.org/show_bug.cgi?id=196778
         <rdar://problem/47606798>
index 822c405..bb52dcf 100644 (file)
@@ -582,10 +582,6 @@ WI.TimelineManager = class TimelineManager extends WI.Object
     {
         // Called from WI.HeapAllocationsInstrument.
 
-        console.assert(this.isCapturing());
-        if (!this.isCapturing())
-            return;
-
         this._addRecord(new WI.HeapAllocationsTimelineRecord(timestamp, snapshot));
     }
 
@@ -860,8 +856,6 @@ WI.TimelineManager = class TimelineManager extends WI.Object
 
     _addRecord(record)
     {
-        console.assert(this.isCapturing());
-
         this._activeRecording.addRecord(record);
 
         // Only worry about dead time after the load event.