Skip to content

Commit

Permalink
Bug 1374735 - use DevToolsShim to create TabTarget in ext-devtools;r=…
Browse files Browse the repository at this point in the history
…mixedpuppy

Removing dependencies from mozilla-central to devtools. Use DevTools shim instead
of directly depending on devtools code here.

MozReview-Commit-ID: CeV5tfw1Vnz
  • Loading branch information
juliandescottes committed Jun 22, 2017
1 parent 2b3abff commit 82bdf81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions browser/components/extensions/ext-devtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ global.getDevToolsTargetForContext = async (context) => {
throw new Error("Unexpected target type: only local tabs are currently supported.");
}

const {TabTarget} = require("devtools/client/framework/target");

context.devToolsTarget = new TabTarget(context.devToolsToolbox.target.tab);
const tab = context.devToolsToolbox.target.tab;
context.devToolsTarget = DevToolsShim.getTargetForTab(tab);
await context.devToolsTarget.makeRemote();

return context.devToolsTarget;
Expand Down
2 changes: 1 addition & 1 deletion devtools/shim/DevToolsShim.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ let addonSdkMethods = [
"closeToolbox",
"connectDebuggerServer",
"createDebuggerClient",
"getTargetForTab",
"getToolbox",
"initBrowserToolboxProcessForAddon",
"showToolbox",
Expand All @@ -299,6 +298,7 @@ let addonSdkMethods = [
* therefore DevTools should always be available when they are called.
*/
let webExtensionsMethods = [
"getTargetForTab",
"getTheme",
];

Expand Down

0 comments on commit 82bdf81

Please sign in to comment.