Created
May 14, 2019 15:28
-
-
Save jasonLaster/29b283a11ec2f4cc59a84d3a05b8330b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/devtools/client/debugger/src/actions/navigation.js b/devtools/client/debugger/src/actions/navigation.js | |
index 1f8a0eb2e423..dd60da7c6794 100644 | |
--- a/devtools/client/debugger/src/actions/navigation.js | |
+++ b/devtools/client/debugger/src/actions/navigation.js | |
@@ -48,14 +48,20 @@ export function willNavigate(event: Object) { | |
}; | |
} | |
-export function connect(url: string, actor: string, canRewind: boolean) { | |
+export function connect( | |
+ url: string, | |
+ actor: string, | |
+ canRewind: boolean, | |
+ isWebExtension: boolean | |
+) { | |
return async function({ dispatch }: ThunkArgs) { | |
await dispatch(updateWorkers()); | |
dispatch( | |
({ | |
type: "CONNECT", | |
mainThread: { url, actor, type: -1, name: "" }, | |
- canRewind | |
+ canRewind, | |
+ isWebExtension | |
}: Action) | |
); | |
}; | |
diff --git a/devtools/client/debugger/src/client/firefox.js b/devtools/client/debugger/src/client/firefox.js | |
index 5cbd6b0bba5d..e849a0fa0244 100644 | |
--- a/devtools/client/debugger/src/client/firefox.js | |
+++ b/devtools/client/debugger/src/client/firefox.js | |
@@ -58,7 +58,8 @@ export async function onConnect(connection: any, actions: Object) { | |
await actions.connect( | |
tabTarget.url, | |
threadClient.actor, | |
- traits && traits.canRewind | |
+ traits && traits.canRewind, | |
+ tabTarget.isWebExtension | |
); | |
await actions.newGeneratedSources(sourceInfo); | |
diff --git a/devtools/client/debugger/src/reducers/debuggee.js b/devtools/client/debugger/src/reducers/debuggee.js | |
index 110ee943a147..6c66fc1954ce 100644 | |
--- a/devtools/client/debugger/src/reducers/debuggee.js | |
+++ b/devtools/client/debugger/src/reducers/debuggee.js | |
@@ -20,13 +20,15 @@ import type { Action } from "../actions/types"; | |
export type DebuggeeState = { | |
workers: WorkerList, | |
- mainThread: MainThread | |
+ mainThread: MainThread, | |
+ isWebExtension: Boolean | |
}; | |
export function initialDebuggeeState(): DebuggeeState { | |
return { | |
workers: [], | |
- mainThread: { actor: "", url: "", type: -1, name: "" } | |
+ mainThread: { actor: "", url: "", type: -1, name: "" }, | |
+ isWebExtension: false | |
}; | |
} | |
@@ -38,7 +40,8 @@ export default function debuggee( | |
case "CONNECT": | |
return { | |
...state, | |
- mainThread: { ...action.mainThread, name: L10N.getStr("mainThread") } | |
+ mainThread: { ...action.mainThread, name: L10N.getStr("mainThread") }, | |
+ isWebExtension: action.isWebExtension | |
}; | |
case "INSERT_WORKERS": | |
return insertWorkers(state, action.workers); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment