Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/devtools/client/debugger/src/actions/navigation.js b/devtools/client/debugger/src/actions/navigation.js
- index a6ed37c7b03d..3e519cd071c2 100644
- --- a/devtools/client/debugger/src/actions/navigation.js
- +++ b/devtools/client/debugger/src/actions/navigation.js
- @@ -48,7 +48,7 @@ export function willNavigate(event: Object) {
- export function connect(
- url: string,
- actor: string,
- - canRewind: boolean,
- + traits,
- isWebExtension: boolean
- ) {
- return async function({ dispatch }: ThunkArgs) {
- @@ -62,7 +62,7 @@ export function connect(
- type: "mainThread",
- name: L10N.getStr("mainThread"),
- },
- - canRewind,
- + traits,
- isWebExtension,
- }: Action)
- );
- diff --git a/devtools/client/debugger/src/client/firefox.js b/devtools/client/debugger/src/client/firefox.js
- index d79c76f2b797..0f53ca9bebec 100644
- --- a/devtools/client/debugger/src/client/firefox.js
- +++ b/devtools/client/debugger/src/client/firefox.js
- @@ -59,7 +59,7 @@ export async function onConnect(connection: any, actions: Object) {
- await actions.connect(
- tabTarget.url,
- threadFront.actor,
- - traits && traits.canRewind,
- + traits,
- tabTarget.isWebExtension
- );
- diff --git a/devtools/client/debugger/src/reducers/pause.js b/devtools/client/debugger/src/reducers/pause.js
- index 226e20ca2881..ce271243e89b 100644
- --- a/devtools/client/debugger/src/reducers/pause.js
- +++ b/devtools/client/debugger/src/reducers/pause.js
- @@ -91,7 +91,6 @@ type ThreadPauseState = {
- export type PauseState = {
- cx: Context,
- threadcx: ThreadContext,
- - canRewind: boolean,
- threads: { [ThreadId]: ThreadPauseState },
- skipPausing: boolean,
- mapScopes: boolean,
- @@ -113,7 +112,6 @@ function createPauseState(thread: ThreadId = "UnknownThread") {
- },
- previewLocation: null,
- threads: {},
- - canRewind: false,
- skipPausing: prefs.skipPausing,
- mapScopes: prefs.mapScopes,
- shouldPauseOnExceptions: prefs.pauseOnExceptions,
- @@ -136,7 +134,6 @@ const resumedPauseState = {
- const createInitialPauseState = () => ({
- ...resumedPauseState,
- isWaitingOnBreak: false,
- - canRewind: false,
- command: null,
- lastCommand: null,
- previousLocation: null,
- @@ -279,7 +276,6 @@ function update(
- case "CONNECT":
- return {
- ...createPauseState(action.mainThread.actor),
- - canRewind: action.canRewind,
- };
- case "PAUSE_ON_EXCEPTIONS": {
- @@ -485,10 +481,6 @@ export function getShouldPauseOnCaughtExceptions(state: State) {
- return state.pause.shouldPauseOnCaughtExceptions;
- }
- -export function getCanRewind(state: State) {
- - return state.pause.canRewind;
- -}
- -
- export function getFrames(state: State, thread: ThreadId) {
- return getThreadPauseState(state.pause, thread).frames;
- }
- diff --git a/devtools/client/debugger/src/reducers/threads.js b/devtools/client/debugger/src/reducers/threads.js
- index 4e2ae25635cd..4ffba29ad738 100644
- --- a/devtools/client/debugger/src/reducers/threads.js
- +++ b/devtools/client/debugger/src/reducers/threads.js
- @@ -25,6 +25,7 @@ export type ThreadsState = {
- export function initialThreadsState(): ThreadsState {
- return {
- threads: [],
- + traits: {},
- mainThread: {
- actor: "",
- url: "",
- @@ -44,6 +45,7 @@ export default function update(
- return {
- ...state,
- mainThread: action.mainThread,
- + traits, action.traits,
- isWebExtension: action.isWebExtension,
- };
- case "INSERT_THREADS":
- @@ -92,6 +94,12 @@ export const getAllThreads: Selector<Thread[]> = createSelector(
- ]
- );
- +
- +export function getCanRewind(state: State) {
- + return state.threads.traits.canRewind;
- +}
- +
- +
- // checks if a path begins with a thread actor
- // e.g "server1.conn0.child1/workerTarget22/context1/dbg-workers.glitch.me"
- export function startsWithThreadActor(state: State, path: string) {
- @@ -101,4 +109,8 @@ export function startsWithThreadActor(state: State, path: string) {
- return match && match[1];
- }
- +
- +
- type OuterState = { threads: ThreadsState };
- +
- +
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement