Bug 1547084 Part 2 - Remove reverseStepIn and reverseStepOut logic, r=loganfsmyth.
authorBrian Hackett <bhackett1024@gmail.com>
Sun, 12 May 2019 13:15:05 -1000
changeset 536103 ae4aa5c6c43010a553f7f30e30334333179c4647
parent 536102 6cd72bb81d8952d3b2ea8c8cd7cdcc9618d8e290
child 536104 4d7ef85fc81f1f3d37098ec0809ca14c62d79ccd
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersloganfsmyth
bugs1547084
milestone68.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 1547084 Part 2 - Remove reverseStepIn and reverseStepOut logic, r=loganfsmyth.
devtools/client/debugger/src/actions/pause/commands.js
devtools/client/debugger/src/actions/pause/index.js
devtools/client/debugger/src/client/firefox/commands.js
devtools/client/debugger/src/client/firefox/types.js
devtools/client/debugger/src/components/SecondaryPanes/CommandBar.js
devtools/client/debugger/src/components/shared/AccessibleImage.css
devtools/client/debugger/src/reducers/pause.js
devtools/client/webreplay/mochitest/head.js
devtools/server/actors/thread.js
devtools/shared/client/thread-client.js
--- a/devtools/client/debugger/src/actions/pause/commands.js
+++ b/devtools/client/debugger/src/actions/pause/commands.js
@@ -137,57 +137,29 @@ export function rewind(cx: ThreadContext
   return ({ dispatch, getState }: ThunkArgs) => {
     if (cx.isPaused) {
       return dispatch(command(cx, "rewind"));
     }
   };
 }
 
 /**
- * reverseStepIn
- * @memberof actions/pause
- * @static
- * @returns {Function} {@link command}
- */
-export function reverseStepIn(cx: ThreadContext) {
-  return ({ dispatch, getState }: ThunkArgs) => {
-    if (cx.isPaused) {
-      return dispatch(command(cx, "reverseStepIn"));
-    }
-  };
-}
-
-/**
  * reverseStepOver
  * @memberof actions/pause
  * @static
  * @returns {Function} {@link command}
  */
 export function reverseStepOver(cx: ThreadContext) {
   return ({ dispatch, getState }: ThunkArgs) => {
     if (cx.isPaused) {
       return dispatch(astCommand(cx, "reverseStepOver"));
     }
   };
 }
 
-/**
- * reverseStepOut
- * @memberof actions/pause
- * @static
- * @returns {Function} {@link command}
- */
-export function reverseStepOut(cx: ThreadContext) {
-  return ({ dispatch, getState }: ThunkArgs) => {
-    if (cx.isPaused) {
-      return dispatch(command(cx, "reverseStepOut"));
-    }
-  };
-}
-
 /*
  * Checks for await or yield calls on the paused line
  * This avoids potentially expensive parser calls when we are likely
  * not at an async expression.
  */
 function hasAwait(content: AsyncValue<SourceContent> | null, pauseLocation) {
   const { line, column } = pauseLocation;
   if (!content || !isFulfilled(content) || content.value.type !== "text") {
--- a/devtools/client/debugger/src/actions/pause/index.js
+++ b/devtools/client/debugger/src/actions/pause/index.js
@@ -11,19 +11,17 @@
 
 export {
   selectThread,
   stepIn,
   stepOver,
   stepOut,
   resume,
   rewind,
-  reverseStepIn,
-  reverseStepOver,
-  reverseStepOut
+  reverseStepOver
 } from "./commands";
 export { fetchScopes } from "./fetchScopes";
 export { paused } from "./paused";
 export { resumed } from "./resumed";
 export { continueToHere } from "./continueToHere";
 export { breakOnNext } from "./breakOnNext";
 export { mapFrames } from "./mapFrames";
 export { pauseOnExceptions } from "./pauseOnExceptions";
--- a/devtools/client/debugger/src/client/firefox/commands.js
+++ b/devtools/client/debugger/src/client/firefox/commands.js
@@ -142,28 +142,20 @@ function stepOver(thread: string): Promi
 function stepOut(thread: string): Promise<*> {
   return lookupThreadClient(thread).stepOut();
 }
 
 function rewind(thread: string): Promise<*> {
   return lookupThreadClient(thread).rewind();
 }
 
-function reverseStepIn(thread: string): Promise<*> {
-  return lookupThreadClient(thread).reverseStepIn();
-}
-
 function reverseStepOver(thread: string): Promise<*> {
   return lookupThreadClient(thread).reverseStepOver();
 }
 
-function reverseStepOut(thread: string): Promise<*> {
-  return lookupThreadClient(thread).reverseStepOut();
-}
-
 function breakOnNext(thread: string): Promise<*> {
   return lookupThreadClient(thread).breakOnNext();
 }
 
 async function sourceContents({
   actor,
   thread
 }: SourceActor): Promise<{| source: any, contentType: ?string |}> {
@@ -502,18 +494,16 @@ const clientCommands = {
   releaseActor,
   interrupt,
   pauseGrip,
   resume,
   stepIn,
   stepOut,
   stepOver,
   rewind,
-  reverseStepIn,
-  reverseStepOut,
   reverseStepOver,
   breakOnNext,
   sourceContents,
   getSourceForActor,
   getBreakpointPositions,
   getBreakableLines,
   hasBreakpoint,
   setBreakpoint,
--- a/devtools/client/debugger/src/client/firefox/types.js
+++ b/devtools/client/debugger/src/client/firefox/types.js
@@ -342,19 +342,17 @@ export type ObjectClient = {
  * @static
  */
 export type ThreadClient = {
   resume: Function => Promise<*>,
   stepIn: Function => Promise<*>,
   stepOver: Function => Promise<*>,
   stepOut: Function => Promise<*>,
   rewind: Function => Promise<*>,
-  reverseStepIn: Function => Promise<*>,
   reverseStepOver: Function => Promise<*>,
-  reverseStepOut: Function => Promise<*>,
   breakOnNext: () => Promise<*>,
   // FIXME: unclear if SourceId or ActorId here
   source: ({ actor: SourceId }) => SourceClient,
   pauseGrip: (Grip | Function) => ObjectClient,
   pauseOnExceptions: (boolean, boolean) => Promise<*>,
   setBreakpoint: (BreakpointLocation, BreakpointOptions) => Promise<*>,
   removeBreakpoint: PendingLocation => Promise<*>,
   setXHRBreakpoint: (path: string, method: string) => Promise<boolean>,
--- a/devtools/client/debugger/src/components/SecondaryPanes/CommandBar.js
+++ b/devtools/client/debugger/src/components/SecondaryPanes/CommandBar.js
@@ -82,18 +82,16 @@ type Props = {
   canRewind: boolean,
   skipPausing: boolean,
   resume: typeof actions.resume,
   stepIn: typeof actions.stepIn,
   stepOut: typeof actions.stepOut,
   stepOver: typeof actions.stepOver,
   breakOnNext: typeof actions.breakOnNext,
   rewind: typeof actions.rewind,
-  reverseStepIn: typeof actions.reverseStepIn,
-  reverseStepOut: typeof actions.reverseStepOut,
   reverseStepOver: typeof actions.reverseStepOver,
   pauseOnExceptions: typeof actions.pauseOnExceptions,
   toggleSkipPausing: typeof actions.toggleSkipPausing
 };
 
 class CommandBar extends Component<Props> {
   componentWillUnmount() {
     const shortcuts = this.context.shortcuts;
@@ -326,15 +324,13 @@ export default connect(
   mapStateToProps,
   {
     resume: actions.resume,
     stepIn: actions.stepIn,
     stepOut: actions.stepOut,
     stepOver: actions.stepOver,
     breakOnNext: actions.breakOnNext,
     rewind: actions.rewind,
-    reverseStepIn: actions.reverseStepIn,
-    reverseStepOut: actions.reverseStepOut,
     reverseStepOver: actions.reverseStepOver,
     pauseOnExceptions: actions.pauseOnExceptions,
     toggleSkipPausing: actions.toggleSkipPausing
   }
 )(CommandBar);
--- a/devtools/client/debugger/src/components/shared/AccessibleImage.css
+++ b/devtools/client/debugger/src/components/shared/AccessibleImage.css
@@ -149,26 +149,16 @@ html[dir="rtl"] .img.more-tabs {
 .img.regex-match {
   mask-image: url(resource://devtools/client/debugger/images/regex-match.svg);
 }
 
 .img.resume {
   mask-image: url(resource://devtools/client/debugger/images/resume.svg);
 }
 
-.img.reverseStepIn {
-  mask-image: url(resource://devtools/client/debugger/images/stepIn.svg);
-  transform: scaleX(-1);
-}
-
-.img.reverseStepOut {
-  mask-image: url(resource://devtools/client/debugger/images/stepOut.svg);
-  transform: scaleX(-1);
-}
-
 .img.reverseStepOver {
   mask-image: url(resource://devtools/client/debugger/images/stepOver.svg);
   transform: scaleX(-1);
 }
 
 .img.rewind {
   mask-image: url(resource://devtools/client/debugger/images/rewind.svg);
 }
--- a/devtools/client/debugger/src/reducers/pause.js
+++ b/devtools/client/debugger/src/reducers/pause.js
@@ -32,19 +32,17 @@ import type {
 
 export type Command =
   | null
   | "stepOver"
   | "stepIn"
   | "stepOut"
   | "resume"
   | "rewind"
-  | "reverseStepOver"
-  | "reverseStepIn"
-  | "reverseStepOut";
+  | "reverseStepOver";
 
 // Pause state associated with an individual thread.
 type ThreadPauseState = {
   why: ?Why,
   isWaitingOnBreak: boolean,
   frames: ?(any[]),
   frameScopes: {
     generated: {
--- a/devtools/client/webreplay/mochitest/head.js
+++ b/devtools/client/webreplay/mochitest/head.js
@@ -66,19 +66,17 @@ function resumeThenPauseAtLineFunctionFa
 }
 
 // Define various methods that resume a thread in a specific way and ensure it
 // pauses at a specified line.
 var rewindToLine = resumeThenPauseAtLineFunctionFactory("rewind");
 var resumeToLine = resumeThenPauseAtLineFunctionFactory("resume");
 var reverseStepOverToLine = resumeThenPauseAtLineFunctionFactory("reverseStepOver");
 var stepOverToLine = resumeThenPauseAtLineFunctionFactory("stepOver");
-var reverseStepInToLine = resumeThenPauseAtLineFunctionFactory("reverseStepIn");
 var stepInToLine = resumeThenPauseAtLineFunctionFactory("stepIn");
-var reverseStepOutToLine = resumeThenPauseAtLineFunctionFactory("reverseStepOut");
 var stepOutToLine = resumeThenPauseAtLineFunctionFactory("stepOut");
 
 // Return a promise that resolves when a thread evaluates a string in the
 // topmost frame, with the result throwing an exception.
 async function checkEvaluateInTopFrameThrows(target, text) {
   const threadClient = target.threadClient;
   const consoleFront = await target.getFront("console");
   const { frames } = await threadClient.getFrames(0, 1);
--- a/devtools/server/actors/thread.js
+++ b/devtools/server/actors/thread.js
@@ -552,27 +552,21 @@ const ThreadActor = ActorClassWithSpec(t
     }
 
     // If the parent actor has been closed, terminate the debuggee script
     // instead of continuing. Executing JS after the content window is gone is
     // a bad idea.
     return this._parentClosed ? null : undefined;
   },
 
-  _makeOnEnterFrame: function({ pauseAndRespond, rewinding }) {
+  _makeOnEnterFrame: function({ pauseAndRespond }) {
     return frame => {
       const { generatedSourceActor } = this.sources.getFrameLocation(frame);
 
       const url = generatedSourceActor.url;
-
-      // When rewinding into a frame, we end up at the point when it is being popped.
-      if (rewinding) {
-        frame.reportedPop = true;
-      }
-
       if (this.sources.isBlackBoxed(url)) {
         return undefined;
       }
 
       return pauseAndRespond(frame);
     };
   },
 
@@ -838,21 +832,18 @@ const ThreadActor = ActorClassWithSpec(t
     );
 
     // Make sure there is still a frame on the stack if we are to continue
     // stepping.
     const stepFrame = this._getNextStepFrame(this.youngestFrame, rewinding);
     if (stepFrame) {
       switch (steppingType) {
         case "step":
-          if (rewinding) {
-            this.dbg.replayingOnPopFrame = onEnterFrame;
-          } else {
-            this.dbg.onEnterFrame = onEnterFrame;
-          }
+          assert(!rewinding, "'step' resume limit cannot be used while rewinding");
+          this.dbg.onEnterFrame = onEnterFrame;
           // Fall through.
         case "break":
         case "next":
           if (stepFrame.script) {
             if (this.dbg.replaying) {
               const offsets =
                 this._findReplayingStepOffsets(generatedLocation, stepFrame, rewinding);
               stepFrame.setReplayingOnStep(onStep, offsets);
@@ -1189,17 +1180,16 @@ const ThreadActor = ActorClassWithSpec(t
     if (this.state === "paused") {
       return undefined;
     }
 
     this._state = "paused";
 
     // Clear stepping hooks.
     this.dbg.onEnterFrame = undefined;
-    this.dbg.replayingOnPopFrame = undefined;
     this.dbg.onExceptionUnwind = undefined;
     this._clearSteppingHooks();
 
     // Create the actor pool that will hold the pause actor and its
     // children.
     assert(!this._pausePool, "No pause pool should exist yet");
     this._pausePool = new ActorPool(this.conn);
     this.conn.addActorPool(this._pausePool);
--- a/devtools/shared/client/thread-client.js
+++ b/devtools/shared/client/thread-client.js
@@ -155,30 +155,16 @@ ThreadClient.prototype = {
   /**
    * Rewind step over a function call.
    */
   reverseStepOver: function() {
     return this._doResume({ type: "next" }, true);
   },
 
   /**
-   * Rewind step into a function call.
-   */
-  reverseStepIn: function() {
-    return this._doResume({ type: "step" }, true);
-  },
-
-  /**
-   * Rewind step out of a function call.
-   */
-  reverseStepOut: function() {
-    return this._doResume({ type: "finish" }, true);
-  },
-
-  /**
    * Immediately interrupt a running thread.
    */
   interrupt: function() {
     return this._doInterrupt(null);
   },
 
   /**
    * Pause execution right before the next JavaScript bytecode is executed.