Bug 1485676 - Adapt gDevTools.createTargetForTab to new TabTarget class. r=yulia

Summary: Depends On D4536

Reviewers: yulia!

Tags: #secure-revision

Bug #: 1485676

Differential Revision: https://phabricator.services.mozilla.com/D4537

MozReview-Commit-ID: E3AIMyFgL5m
This commit is contained in:
Alexandre Poirot 2018-08-29 05:34:37 -07:00
Родитель 36471d8e5c
Коммит 7b7f2b7ebd
2 изменённых файлов: 2 добавлений и 4 удалений

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

@ -48,8 +48,7 @@ global.getDevToolsTargetForContext = async (context) => {
}
const tab = context.devToolsToolbox.target.tab;
context.devToolsTarget = DevToolsShim.createTargetForTab(tab);
context.devToolsTarget = await DevToolsShim.createTargetForTab(tab);
await context.devToolsTarget.makeRemote();
return context.devToolsTarget;

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

@ -10,7 +10,6 @@ const Services = require("Services");
const {DevToolsShim} = require("chrome://devtools-startup/content/DevToolsShim.jsm");
loader.lazyRequireGetter(this, "TargetFactory", "devtools/client/framework/target", true);
loader.lazyRequireGetter(this, "TabTarget", "devtools/client/framework/target", true);
loader.lazyRequireGetter(this, "ToolboxHostManager", "devtools/client/framework/toolbox-host-manager", true);
loader.lazyRequireGetter(this, "HUDService", "devtools/client/webconsole/hudservice", true);
loader.lazyRequireGetter(this, "Telemetry", "devtools/client/shared/telemetry");
@ -620,7 +619,7 @@ DevTools.prototype = {
* cached instances managed by DevTools target factory.
*/
createTargetForTab: function(tab) {
return new TabTarget(tab);
return TargetFactory.createTargetForTab(tab);
},
/**