Commit 4aa38134 authored by Alexei Filippov's avatar Alexei Filippov Committed by Commit Bot

DevTools: Fix timeline stop recording race.

The recording could have already being stopped by the time auto stop kicks in.

BUG=832332

Change-Id: Ia25f8b7c3fc9c0ba62956ed5d8286fdcc786cdee
Reviewed-on: https://chromium-review.googlesource.com/1011399Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550655}
parent 5c85ee88
...@@ -760,9 +760,8 @@ Timeline.TimelinePanel = class extends UI.Panel { ...@@ -760,9 +760,8 @@ Timeline.TimelinePanel = class extends UI.Panel {
await new Promise(r => setTimeout(r, this._millisecondsToRecordAfterLoadEvent)); await new Promise(r => setTimeout(r, this._millisecondsToRecordAfterLoadEvent));
// Check if we're still in the same recording session. // Check if we're still in the same recording session.
if (controller !== this._controller) if (controller !== this._controller || this._state !== Timeline.TimelinePanel.State.Recording)
return; return;
this._recordingPageReload = false;
this._stopRecording(); this._stopRecording();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment