Bug 1547084 Part 2 - Remove reverseStepIn and reverseStepOut logic, r=loganfsmyth.

--HG--
extra : rebase_source : 9cd48bddd6d4156036b5732a94d3a2c79fd3e992
This commit is contained in:
Brian Hackett 2019-05-12 13:15:05 -10:00
Родитель a231842bb7
Коммит c201146e83
10 изменённых файлов: 5 добавлений и 89 удалений

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

@ -141,20 +141,6 @@ export function rewind(cx: ThreadContext) {
};
}
/**
* 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
@ -169,20 +155,6 @@ export function reverseStepOver(cx: ThreadContext) {
};
}
/**
* 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

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

@ -16,9 +16,7 @@ export {
stepOut,
resume,
rewind,
reverseStepIn,
reverseStepOver,
reverseStepOut
reverseStepOver
} from "./commands";
export { fetchScopes } from "./fetchScopes";
export { paused } from "./paused";

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

@ -147,18 +147,10 @@ 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();
}
@ -507,8 +499,6 @@ const clientCommands = {
stepOut,
stepOver,
rewind,
reverseStepIn,
reverseStepOut,
reverseStepOver,
breakOnNext,
sourceContents,

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

@ -347,9 +347,7 @@ export type ThreadClient = {
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,

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

@ -87,8 +87,6 @@ type Props = {
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
@ -331,8 +329,6 @@ export default connect(
stepOver: actions.stepOver,
breakOnNext: actions.breakOnNext,
rewind: actions.rewind,
reverseStepIn: actions.reverseStepIn,
reverseStepOut: actions.reverseStepOut,
reverseStepOver: actions.reverseStepOver,
pauseOnExceptions: actions.pauseOnExceptions,
toggleSkipPausing: actions.toggleSkipPausing

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

@ -154,16 +154,6 @@ html[dir="rtl"] .img.more-tabs {
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);

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

@ -37,9 +37,7 @@ export type Command =
| "stepOut"
| "resume"
| "rewind"
| "reverseStepOver"
| "reverseStepIn"
| "reverseStepOut";
| "reverseStepOver";
// Pause state associated with an individual thread.
type ThreadPauseState = {

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

@ -71,9 +71,7 @@ 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

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

@ -557,17 +557,11 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
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;
}
@ -843,11 +837,8 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
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":
@ -1194,7 +1185,6 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
// Clear stepping hooks.
this.dbg.onEnterFrame = undefined;
this.dbg.replayingOnPopFrame = undefined;
this.dbg.onExceptionUnwind = undefined;
this._clearSteppingHooks();

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

@ -159,20 +159,6 @@ ThreadClient.prototype = {
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.
*/