Title: [246292] trunk/Source/WebInspectorUI
Revision
246292
Author
drou...@apple.com
Date
2019-06-10 16:15:41 -0700 (Mon, 10 Jun 2019)

Log Message

Web Inspector: Timelines: imported recordings do not have _javascript_ call trees
https://bugs.webkit.org/show_bug.cgi?id=197490
<rdar://problem/50589158>

Reviewed by Joseph Pecoraro.

* UserInterface/Models/TimelineRecording.js:
(WI.TimelineRecording.prototype.initializeCallingContextTrees):
Make sure to actually save the provided stack traces and samples in the export data.

* UserInterface/Models/ScriptTimelineRecord.js:
(WI.ScriptTimelineRecord.fromJSON):
(WI.ScriptTimelineRecord.prototype.toJSON):
Drive-by: include `extraDetails`, which contains useful information like "default prevented".

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (246291 => 246292)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-06-10 23:10:08 UTC (rev 246291)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-06-10 23:15:41 UTC (rev 246292)
@@ -1,3 +1,20 @@
+2019-06-10  Devin Rousso  <drou...@apple.com>
+
+        Web Inspector: Timelines: imported recordings do not have _javascript_ call trees
+        https://bugs.webkit.org/show_bug.cgi?id=197490
+        <rdar://problem/50589158>
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Models/TimelineRecording.js:
+        (WI.TimelineRecording.prototype.initializeCallingContextTrees):
+        Make sure to actually save the provided stack traces and samples in the export data.
+
+        * UserInterface/Models/ScriptTimelineRecord.js:
+        (WI.ScriptTimelineRecord.fromJSON):
+        (WI.ScriptTimelineRecord.prototype.toJSON):
+        Drive-by: include `extraDetails`, which contains useful information like "default prevented".
+
 2019-06-10  Nikita Vasilyev  <nvasil...@apple.com>
 
         REGRESSION(r244268): Web Inspector: Styles: navigating from Computed to Styles doesn't work

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js (246291 => 246292)


--- trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js	2019-06-10 23:10:08 UTC (rev 246291)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/ScriptTimelineRecord.js	2019-06-10 23:15:41 UTC (rev 246292)
@@ -53,12 +53,12 @@
 
     static fromJSON(json)
     {
-        let {eventType, startTime, endTime, callFrames, sourceCodeLocation, details, profilePayload} = json;
+        let {eventType, startTime, endTime, callFrames, sourceCodeLocation, details, profilePayload, extraDetails} = json;
 
         if (typeof details === "object" && details.__type === "GarbageCollection")
             details = WI.GarbageCollection.fromJSON(details);
 
-        return new WI.ScriptTimelineRecord(eventType, startTime, endTime, callFrames, sourceCodeLocation, details, profilePayload);
+        return new WI.ScriptTimelineRecord(eventType, startTime, endTime, callFrames, sourceCodeLocation, details, profilePayload, extraDetails);
     }
 
     toJSON()
@@ -65,6 +65,7 @@
     {
         // FIXME: CallFrames
         // FIXME: SourceCodeLocation
+        // FIXME: profilePayload
 
         return {
             type: this.type,
@@ -72,6 +73,7 @@
             startTime: this.startTime,
             endTime: this.endTime,
             details: this._details,
+            extraDetails: this._extraDetails,
         };
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js (246291 => 246292)


--- trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js	2019-06-10 23:10:08 UTC (rev 246291)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/TimelineRecording.js	2019-06-10 23:15:41 UTC (rev 246292)
@@ -431,8 +431,8 @@
 
     initializeCallingContextTrees(stackTraces, sampleDurations)
     {
-        this._exportDataSampleStackTraces.concat(stackTraces);
-        this._exportDataSampleDurations.concat(sampleDurations);
+        this._exportDataSampleStackTraces = this._exportDataSampleStackTraces.concat(stackTraces);
+        this._exportDataSampleDurations = this._exportDataSampleDurations.concat(sampleDurations);
 
         for (let i = 0; i < stackTraces.length; i++) {
             this._topDownCallingContextTree.updateTreeWithStackTrace(stackTraces[i], sampleDurations[i]);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to