Bug 1488370 - Use target.getFront to instantiate WebGLFront; r=ochameau

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
yulia 2018-09-28 18:04:29 +00:00
Родитель b107324366
Коммит 93303e9746
2 изменённых файлов: 2 добавлений и 4 удалений

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

@ -6,7 +6,6 @@
"use strict"; "use strict";
const EventEmitter = require("devtools/shared/event-emitter"); const EventEmitter = require("devtools/shared/event-emitter");
const { WebGLFront } = require("devtools/shared/fronts/webgl");
const { EventsHandler, ShadersListView, ShadersEditorsView, EVENTS, $, L10N } = const { EventsHandler, ShadersListView, ShadersEditorsView, EVENTS, $, L10N } =
require("./shadereditor"); require("./shadereditor");
@ -34,7 +33,7 @@ ShaderEditorPanel.prototype = {
* A promise that is resolved when the Shader Editor completes opening. * A promise that is resolved when the Shader Editor completes opening.
*/ */
async open() { async open() {
this.front = new WebGLFront(this.target.client, this.target.form); this.front = this.target.getFront("webgl");
this.shadersListView = new ShadersListView(); this.shadersListView = new ShadersListView();
this.eventsHandler = new EventsHandler(); this.eventsHandler = new EventsHandler();
this.shadersEditorsView = new ShadersEditorsView(); this.shadersEditorsView = new ShadersEditorsView();

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

@ -13,7 +13,6 @@ Services.scriptloader.loadSubScript(
var { DebuggerClient } = require("devtools/shared/client/debugger-client"); var { DebuggerClient } = require("devtools/shared/client/debugger-client");
var { DebuggerServer } = require("devtools/server/main"); var { DebuggerServer } = require("devtools/server/main");
var { WebGLFront } = require("devtools/shared/fronts/webgl");
var { Toolbox } = require("devtools/client/framework/toolbox"); var { Toolbox } = require("devtools/client/framework/toolbox");
var { isWebGLSupported } = require("devtools/client/shared/webgl-utils"); var { isWebGLSupported } = require("devtools/client/shared/webgl-utils");
@ -153,7 +152,7 @@ function initBackend(aUrl) {
await target.attach(); await target.attach();
const front = new WebGLFront(target.client, target.form); const front = target.getFront("webgl");
return { target, front }; return { target, front };
})(); })();
} }