Bug 1580362 - Rewinding while recording should rewind to the last breakpoint. r=bhackett

Differential Revision: https://phabricator.services.mozilla.com/D45473

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jason Laster 2019-09-11 04:16:15 +00:00
Родитель 9ccf6b264c
Коммит 43f6a1b816
2 изменённых файлов: 6 добавлений и 9 удалений

Просмотреть файл

@ -425,14 +425,6 @@ class WebReplayPlayer extends Component {
}
async rewind() {
if (this.isRecording()) {
await this.threadFront.interrupt();
}
if (!this.isPaused()) {
return null;
}
return this.threadFront.rewind();
}

Просмотреть файл

@ -125,7 +125,12 @@ class ThreadFront extends FrontClassWithSpec(threadSpec) {
/**
* Rewind a thread until a breakpoint is hit.
*/
rewind() {
async rewind() {
if (!this.paused) {
this.interrupt();
await this.once("paused");
}
this._doResume(null, true);
}