Bug 1488376 - Use target.getFront to instantiate ReflowFront; r=ochameau

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
yulia 2018-10-09 10:01:19 +00:00
parent 498cbdfbe4
commit d2ae0d6505

View File

@ -6,8 +6,6 @@
"use strict";
const { ReflowFront } = require("devtools/shared/fronts/reflow");
/**
* Simple utility class that listens to reflows on a given target if and only if a
* listener is actively listening to reflows.
@ -27,7 +25,6 @@ function ReflowTracker(target) {
}
ReflowTracker.prototype = {
destroy() {
if (this.reflowFront) {
this.stopTracking();
@ -41,8 +38,7 @@ ReflowTracker.prototype = {
startTracking() {
// Initialize reflow front if necessary.
if (!this.reflowFront && this.target.form.reflowActor) {
const { client, form } = this.target;
this.reflowFront = ReflowFront(client, form);
this.reflowFront = this.target.getFront("reflow");
}
if (this.reflowFront) {