Bug 1374735 - use DevToolsShim to create TabTarget in ext-devtools;r=mixedpuppy

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

MozReview-Commit-ID: CeV5tfw1Vnz

--HG--
extra : source : 22baf4e67730ce89d5342cb0dd5c1e2e5944b4a1
This commit is contained in:
Julian Descottes 2017-06-22 20:44:56 +02:00
Родитель 76d7cf451f
Коммит 8725798c60
2 изменённых файлов: 3 добавлений и 4 удалений

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

@ -53,9 +53,8 @@ global.getDevToolsTargetForContext = async (context) => {
throw new Error("Unexpected target type: only local tabs are currently supported."); throw new Error("Unexpected target type: only local tabs are currently supported.");
} }
const {TabTarget} = require("devtools/client/framework/target"); const tab = context.devToolsToolbox.target.tab;
context.devToolsTarget = DevToolsShim.getTargetForTab(tab);
context.devToolsTarget = new TabTarget(context.devToolsToolbox.target.tab);
await context.devToolsTarget.makeRemote(); await context.devToolsTarget.makeRemote();
return context.devToolsTarget; return context.devToolsTarget;

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

@ -286,7 +286,6 @@ let addonSdkMethods = [
"closeToolbox", "closeToolbox",
"connectDebuggerServer", "connectDebuggerServer",
"createDebuggerClient", "createDebuggerClient",
"getTargetForTab",
"getToolbox", "getToolbox",
"initBrowserToolboxProcessForAddon", "initBrowserToolboxProcessForAddon",
"showToolbox", "showToolbox",
@ -299,6 +298,7 @@ let addonSdkMethods = [
* therefore DevTools should always be available when they are called. * therefore DevTools should always be available when they are called.
*/ */
let webExtensionsMethods = [ let webExtensionsMethods = [
"getTargetForTab",
"getTheme", "getTheme",
]; ];