Bug 1479524 - Lazy load network-monitor.js dependencies. r=jdescottes
authorAlexandre Poirot <poirot.alex@gmail.com>
Thu, 02 Aug 2018 11:42:07 -0700
changeset 431977 fa0a81fe2da6ad958c1c1dc910e58afb1ba3c6b5
parent 431976 7f6bb6c2bc018d3a25a877f62e79ed103661ea7b
child 431978 a07bcf02053fe4927c21ddc80db396551a7900e3
push id34456
push usertoros@mozilla.com
push dateThu, 16 Aug 2018 21:33:21 +0000
treeherdermozilla-central@72442cf86f54 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1479524
milestone63.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 1479524 - Lazy load network-monitor.js dependencies. r=jdescottes MozReview-Commit-ID: AeqTRlwXQRL
devtools/shared/webconsole/network-monitor.js
--- a/devtools/shared/webconsole/network-monitor.js
+++ b/devtools/shared/webconsole/network-monitor.js
@@ -12,22 +12,25 @@ const Services = require("Services");
 const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm");
 
 loader.lazyRequireGetter(this, "NetworkHelper",
                          "devtools/shared/webconsole/network-helper");
 loader.lazyRequireGetter(this, "DevToolsUtils",
                          "devtools/shared/DevToolsUtils");
 loader.lazyRequireGetter(this, "flags",
                          "devtools/shared/flags");
+loader.lazyRequireGetter(this, "NetworkThrottleManager",
+                         "devtools/shared/webconsole/throttle", true);
+loader.lazyRequireGetter(this, "CacheEntry",
+                         "devtools/shared/platform/cache-entry", true);
 loader.lazyImporter(this, "NetUtil", "resource://gre/modules/NetUtil.jsm");
 loader.lazyServiceGetter(this, "gActivityDistributor",
                          "@mozilla.org/network/http-activity-distributor;1",
                          "nsIHttpActivityDistributor");
-const {NetworkThrottleManager} = require("devtools/shared/webconsole/throttle");
-const {CacheEntry} = require("devtools/shared/platform/cache-entry");
+
 // Network logging
 
 // The maximum uint32 value.
 const PR_UINT32_MAX = 4294967295;
 
 // HTTP status codes.
 const HTTP_MOVED_PERMANENTLY = 301;
 const HTTP_FOUND = 302;