Bug 1533417 - Update selected location when selecting a new thread, r=jlast.

--HG--
extra : rebase_source : 25c40acfe50c7f01deca7c72a8bb7c54d85f1470
This commit is contained in:
Brian Hackett 2019-03-12 10:26:02 -10:00
parent 83df285edd
commit aa430e4e60

View File

@ -9,12 +9,14 @@ import {
getIsPaused,
getCurrentThread,
getSource,
getTopFrame
getTopFrame,
getSelectedFrame
} from "../../selectors";
import { PROMISE } from "../utils/middleware/promise";
import { getNextStep } from "../../workers/parser";
import { addHiddenBreakpoint } from "../breakpoints";
import { evaluateExpressions } from "../expressions";
import { selectLocation } from "../sources";
import { features } from "../../utils/prefs";
import { recordEvent } from "../../utils/telemetry";
@ -26,6 +28,11 @@ export function selectThread(thread: ThreadId) {
return async ({ dispatch, getState, client }: ThunkArgs) => {
await dispatch({ type: "SELECT_THREAD", thread });
dispatch(evaluateExpressions());
const frame = getSelectedFrame(getState(), thread);
if (frame) {
dispatch(selectLocation(frame.location));
}
};
}