Title: [172764] branches/safari-600.1-branch/Source/WebInspectorUI
Revision
172764
Author
[email protected]
Date
2014-08-19 15:05:46 -0700 (Tue, 19 Aug 2014)

Log Message

Merged r172601.  <rdar://problem/18021462>

Modified Paths

Diff

Modified: branches/safari-600.1-branch/Source/WebInspectorUI/ChangeLog (172763 => 172764)


--- branches/safari-600.1-branch/Source/WebInspectorUI/ChangeLog	2014-08-19 21:39:23 UTC (rev 172763)
+++ branches/safari-600.1-branch/Source/WebInspectorUI/ChangeLog	2014-08-19 22:05:46 UTC (rev 172764)
@@ -1,3 +1,39 @@
+2014-08-19  Dana Burkart  <[email protected]>
+
+        Merge r172601
+
+    2014-08-14  Joseph Pecoraro  <[email protected]>
+
+            Web Inspector: Timelines can get caught in requestAnimationFrame loop when not recording
+            https://bugs.webkit.org/show_bug.cgi?id=135946
+
+            Reviewed by Timothy Hatcher.
+
+            Each TimelineContentView was listening for the TimelineManager's start/stop
+            capturing events. However, only the active recording could possibly update.
+            Likewise, if a pre-existing recording started and stopped we did not properly
+            stop in the case where we were waiting for an event to update the current time,
+            which would result in an infinite rAF loop of no updates.
+
+            * UserInterface/Models/TimelineRecording.js:
+            (WebInspector.TimelineRecording.prototype.unloaded):
+            When a timeline recording is unloaded trigger an event.
+
+            * UserInterface/Views/TimelineContentView.js:
+            (WebInspector.TimelineContentView.prototype._startUpdatingCurrentTime):
+            Assert we were not already waiting.
+
+            (WebInspector.TimelineContentView.prototype._stopUpdatingCurrentTime):
+            Properly handle the case of starting/stoping an already existing recording
+            without a new event coming in.
+
+            (WebInspector.TimelineContentView.prototype._recordingTimesUpdated):
+            (WebInspector.TimelineContentView.prototype._recordingReset):
+            Convert to a boolean instead of deleting state.
+
+            (WebInspector.TimelineContentView.prototype._recordingUnloaded):
+            Stop listening to timeline manager events that no longer affect unloaded recordings.
+
 2014-08-13  Lucas Forschler  <[email protected]>
 
         Merge r172533

Modified: branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/TimelineContentView.js (172763 => 172764)


--- branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/TimelineContentView.js	2014-08-19 21:39:23 UTC (rev 172763)
+++ branches/safari-600.1-branch/Source/WebInspectorUI/UserInterface/Views/TimelineContentView.js	2014-08-19 22:05:46 UTC (rev 172764)
@@ -336,6 +336,7 @@
         if (!isNaN(this._currentTime)) {
             // We have a current time already, so we likely need to jump into the future to a better current time.
             // This happens when you stop and later restart recording.
+            console.assert(!this._waitingToResetCurrentTime);
             this._waitingToResetCurrentTime = true;
             this._recording.addEventListener(WebInspector.TimelineRecording.Event.TimesUpdated, this._recordingTimesUpdated, this);
         }
@@ -352,6 +353,12 @@
     {
         console.assert(this._updating);
         this._updating = false;
+
+        if (this._waitingToResetCurrentTime) {
+            // Did not get any event while waiting for the current time, but we should stop waiting.
+            this._recording.removeEventListener(WebInspector.TimelineRecording.Event.TimesUpdated, this._recordingTimesUpdated, this);
+            this._waitingToResetCurrentTime = false;            
+        }
     },
 
     _capturingStarted: function(event)
@@ -382,7 +389,7 @@
         }
 
         this._recording.removeEventListener(WebInspector.TimelineRecording.Event.TimesUpdated, this._recordingTimesUpdated, this);
-        delete this._waitingToResetCurrentTime;
+        this._waitingToResetCurrentTime = false;
     },
 
     _clearTimeline: function(event)
@@ -404,7 +411,7 @@
         this._startTimeNeedsReset = true;
 
         this._recording.removeEventListener(WebInspector.TimelineRecording.Event.TimesUpdated, this._recordingTimesUpdated, this);
-        delete this._waitingToResetCurrentTime;
+        this._waitingToResetCurrentTime = false;
 
         this._overviewTimelineView.reset();
         for (var timelineView of this._discreteTimelineViewMap.values())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to