Bug 1494162 - Part 46: Lazy load openDocLink and assert in MeatballMenu. r=jdescottes
authorGabriel Luong <gabriel.luong@gmail.com>
Wed, 03 Oct 2018 09:38:00 -0400
changeset 495120 2a30a201d8cd303cece8e48e95bc586f757c1cdf
parent 495119 3e91b286a63ebd01c89287ede31554702e582e83
child 495121 3530790e23d18b6f8f73471e367a942f201dd452
child 495180 217d78349cb5b404b8999bc28291da3c086d61df
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)
reviewersjdescottes
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 46: Lazy load openDocLink and assert in MeatballMenu. r=jdescottes
devtools/client/framework/components/MeatballMenu.js
--- a/devtools/client/framework/components/MeatballMenu.js
+++ b/devtools/client/framework/components/MeatballMenu.js
@@ -1,26 +1,26 @@
 /* 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 { PureComponent } = require("devtools/client/shared/vendor/react");
+const { PureComponent, createFactory } = require("devtools/client/shared/vendor/react");
 const PropTypes = require("devtools/client/shared/vendor/react-prop-types");
-const { createFactory } = require("devtools/client/shared/vendor/react");
 const MenuItem = createFactory(
   require("devtools/client/shared/components/menu/MenuItem")
 );
 const MenuList = createFactory(
   require("devtools/client/shared/components/menu/MenuList")
 );
 const dom = require("devtools/client/shared/vendor/react-dom-factories");
 const { hr } = dom;
-const { openDocLink } = require("devtools/client/shared/link");
-const { assert } = require("devtools/shared/DevToolsUtils");
+
+loader.lazyRequireGetter(this, "openDocLink", "devtools/client/shared/link", true);
+loader.lazyRequireGetter(this, "assert", "devtools/shared/DevToolsUtils", true);
 
 const openDevToolsDocsLink = () => {
   openDocLink(
     "https://developer.mozilla.org/docs/Tools?utm_source=devtools&utm_medium=tabbar-menu"
   );
 };
 
 const openCommunityLink = () => {