Web Inspector: race between frontend and backend both starting timeline recordings causes console assert
https://bugs.webkit.org/show_bug.cgi?id=157850
<rdar://problem/26349229>
Reviewed by Joseph Pecoraro.
If TimelineManager has created a fresh recording and the Timeline.autoCaptureStarted
event comes before Timeline.recordingStarted, then the manager will try to start the
same recording twice. In this scenario, the manager should just wait until the
Timeline.recordingStarted event comes, since it causes TimelineMangare to set up
the isCapturing flag and other state.
* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
(WebInspector.TimelineManager.prototype.startCapturing):
(WebInspector.TimelineManager.prototype.capturingStarted):
(WebInspector.TimelineManager.prototype.autoCaptureStarted):
Add a new flag, this._waitingForCapturingStartedEvent. If true, don't start the
recording in response to this event.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@201092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2 files changed