Bug 1511228 - Erase side effects before running forward to execution points, r=mccr8.

--HG--
extra : rebase_source : e910f8ef701efa3560d102ad25ef32c2155c3c7c
This commit is contained in:
Brian Hackett 2018-11-29 15:09:33 -10:00
Родитель d230a7783c
Коммит 1e5869c853
1 изменённых файлов: 6 добавлений и 4 удалений

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

@ -572,13 +572,15 @@ void PausedPhase::RestoreCheckpoint(size_t aCheckpoint) {
void PausedPhase::RunToPoint(const ExecutionPoint& aTarget) {
// This may only be used when we are paused at a normal checkpoint.
MOZ_RELEASE_ASSERT(!mPoint.HasPosition());
size_t checkpoint = mPoint.mCheckpoint;
MOZ_RELEASE_ASSERT(aTarget.mCheckpoint == mPoint.mCheckpoint);
MOZ_RELEASE_ASSERT(aTarget.mCheckpoint == checkpoint);
ResumeExecution();
// If we saved a temporary checkpoint, we need to rewind to erase any side
// effects that have happened, as when resuming forward.
gNavigation->mReachBreakpointPhase.Enter(
CheckpointId(checkpoint), /* aRewind = */ false, aTarget,
/* aTemporaryCheckpoint = */ Nothing());
gNavigation->LastCheckpoint(), /* aRewind = */ mSavedTemporaryCheckpoint,
aTarget, /* aTemporaryCheckpoint = */ Nothing());
}
void PausedPhase::HandleDebuggerRequest(js::CharBuffer* aRequestBuffer) {