Bug 1494162 - Part 26: Lazy load accessibility utils. r=yzen
authorGabriel Luong <gabriel.luong@gmail.com>
Fri, 28 Sep 2018 11:27:37 -0400
changeset 494477 f0c13ab5db4bc2493139521c317770c981f2116a
parent 494476 89a23642630a660d5d816143f735019a4fc488e7
child 494478 b2a9c00cdfefa1c9b739e8efad0b5113f632a3e0
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersyzen
bugs1494162
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1494162 - Part 26: Lazy load accessibility utils. r=yzen
devtools/server/actors/highlighters/accessible.js
--- a/devtools/server/actors/highlighters/accessible.js
+++ b/devtools/server/actors/highlighters/accessible.js
@@ -1,25 +1,27 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const { AutoRefreshHighlighter } = require("./auto-refresh");
-const { getBounds, Infobar } = require("./utils/accessibility");
 const {
   CanvasFrameAnonymousContentHelper,
   createNode,
   createSVGNode,
   isNodeValid,
 } = require("./utils/markup");
 const { TEXT_NODE } = require("devtools/shared/dom-node-constants");
 const { setIgnoreLayoutChanges } = require("devtools/shared/layout/utils");
 
+loader.lazyRequireGetter(this, "getBounds", "devtools/server/actors/highlighters/utils/accessibility", true);
+loader.lazyRequireGetter(this, "Infobar", "devtools/server/actors/highlighters/utils/accessibility", true);
+
 /**
  * The AccessibleHighlighter draws the bounds of an accessible object.
  *
  * Usage example:
  *
  * let h = new AccessibleHighlighter(env);
  * h.show(node, { x, y, w, h, [duration] });
  * h.hide();