Bug 1494162 - Part 4: Lazy load the modules in the TextEditor. r=pbro
authorGabriel Luong <gabriel.luong@gmail.com>
Fri, 28 Sep 2018 12:42:09 -0400
changeset 494551 7a73764c44971d6ae520c3e66d7e32548f14148e
parent 494550 94e830b73e28a7513baf74f5e4071cd4cd373d5b
child 494552 94c2d817402147cac0ab0a3955d9ec0a11176118
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)
reviewerspbro
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 4: Lazy load the modules in the TextEditor. r=pbro
devtools/client/inspector/markup/views/text-editor.js
--- a/devtools/client/inspector/markup/views/text-editor.js
+++ b/devtools/client/inspector/markup/views/text-editor.js
@@ -1,21 +1,22 @@
 /* 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 {getAutocompleteMaxWidth} = require("devtools/client/inspector/markup/utils");
-const {editableField} = require("devtools/client/shared/inplace-editor");
-const {getCssProperties} = require("devtools/shared/fronts/css-properties");
-const {LocalizationHelper} = require("devtools/shared/l10n");
+const { editableField } = require("devtools/client/shared/inplace-editor");
+const { LocalizationHelper } = require("devtools/shared/l10n");
+
+loader.lazyRequireGetter(this, "getAutocompleteMaxWidth", "devtools/client/inspector/markup/utils", true);
+loader.lazyRequireGetter(this, "getCssProperties", "devtools/shared/fronts/css-properties", true);
 
 const INSPECTOR_L10N =
-      new LocalizationHelper("devtools/client/locales/inspector.properties");
+  new LocalizationHelper("devtools/client/locales/inspector.properties");
 
 /**
  * Creates a simple text editor node, used for TEXT and COMMENT
  * nodes.
  *
  * @param  {MarkupContainer} container
  *         The container owning this editor.
  * @param  {DOMNode} node