From d8aca5bfb791b668b430c8fa7e1a75ebaf4e7f63 Mon Sep 17 00:00:00 2001 From: Brian Hackett Date: Tue, 21 May 2019 17:44:53 -1000 Subject: [PATCH] Bug 1483350 - Fix some control logic bugs, r=loganfsmyth. --HG-- extra : rebase_source : 28501766085216f8e731a0ea205a80eea069a798 --- devtools/server/actors/replay/control.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/devtools/server/actors/replay/control.js b/devtools/server/actors/replay/control.js index 73bcdcf3d21e..37e5a63499bb 100644 --- a/devtools/server/actors/replay/control.js +++ b/devtools/server/actors/replay/control.js @@ -274,6 +274,13 @@ ChildProcess.prototype = { }, }); this.asyncManifests.shift(); + + // If this is the active child then we shouldn't leave it in an unpaused + // state, so callers can interact with it as expected. + if (this == gActiveChild) { + this.waitUntilPaused(); + } + return true; }, }; @@ -1214,7 +1221,9 @@ const gControl = { pauseReplayingChild(gPausePoint); gActiveChild.sendManifest({ contents: { kind: "batchDebuggerRequest", requests: gDebuggerRequests }, - onFinished(finishData) { assert(!finishData.restoredCheckpoint); }, + onFinished(finishData) { + assert(!finishData || !finishData.restoredCheckpoint); + }, }); gActiveChild.waitUntilPaused(); return { unhandledDivergence: true };