mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 17:23:59 +00:00
Bug 1493680 - use the new getFront API and properly wait for the promise fullfilment r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D6671 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
191e6758c8
commit
fa3590f449
@ -3,7 +3,6 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
"use strict";
|
||||
|
||||
const { PerfFront } = require("devtools/shared/fronts/perf");
|
||||
loader.lazyRequireGetter(this, "EventEmitter", "devtools/shared/event-emitter");
|
||||
|
||||
class PerformancePanel {
|
||||
@ -29,9 +28,10 @@ class PerformancePanel {
|
||||
this.panelWin.gToolbox = this.toolbox;
|
||||
this.panelWin.gTarget = this.target;
|
||||
|
||||
const rootForm = await this.target.root;
|
||||
const perfFront = new PerfFront(this.target.client, rootForm);
|
||||
const preferenceFront = this.target.client.mainRoot.getFront("preference");
|
||||
const [perfFront, preferenceFront] = await Promise.all([
|
||||
this.target.client.mainRoot.getFront("perf"),
|
||||
this.target.client.mainRoot.getFront("preference")
|
||||
]);
|
||||
|
||||
this.isReady = true;
|
||||
this.emit("ready");
|
||||
|
Loading…
Reference in New Issue
Block a user