Bug 1511228 - Erase side effects before running forward to execution points, r=mccr8.
authorBrian Hackett <bhackett1024@gmail.com>
Thu, 29 Nov 2018 15:09:33 -1000
changeset 509559 835a30210291a037d03088b6d17f88d0419865cf
parent 509558 bb2c3ab2874bdf78f949e2d43e3bccb387a673c3
child 509560 7206ae930051fd16d6a38ca9f202f7085080355d
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs1511228
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1511228 - Erase side effects before running forward to execution points, r=mccr8.
toolkit/recordreplay/ipc/ChildNavigation.cpp
--- a/toolkit/recordreplay/ipc/ChildNavigation.cpp
+++ b/toolkit/recordreplay/ipc/ChildNavigation.cpp
@@ -567,23 +567,25 @@ void PausedPhase::RestoreCheckpoint(size
   ExecutionPoint target = gNavigation->CheckpointExecutionPoint(aCheckpoint);
   bool rewind = target != mPoint;
   Enter(target, rewind, /* aRecordingEndpoint = */ false);
 }
 
 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) {
   MOZ_RELEASE_ASSERT(!mRecoveringFromDivergence);
   MOZ_RELEASE_ASSERT(!mResumeForward);
 
   mRequests.emplaceBack();
   size_t index = mRequests.length() - 1;