Bug 1617887 - part1 followup - assign module.mozmill late. rs=bustage-fix
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Sun, 08 Mar 2020 14:19:22 +0200
changeset 37504 50fa3d8d13ff46846136512e44453bad31a40677
parent 37503 9979881cf01cd02e21f6dc5d7b4edb9b535443c8
child 37505 09cf06df9f5debd3ded3baa5cf62db994da1b878
push id2566
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:20:31 +0000
treeherdercomm-beta@a352facfa0a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage-fix
bugs1617887
Bug 1617887 - part1 followup - assign module.mozmill late. rs=bustage-fix
mail/test/browser/shared-modules/frame.jsm
--- a/mail/test/browser/shared-modules/frame.jsm
+++ b/mail/test/browser/shared-modules/frame.jsm
@@ -57,19 +57,16 @@ var { HttpServer } = ChromeUtils.import(
 
 var os = ChromeUtils.import("resource://testing-common/mozmill/os.jsm");
 var utils = ChromeUtils.import("resource://testing-common/mozmill/utils.jsm");
 var securableModule = ChromeUtils.import(
   "resource://testing-common/mozmill/securable-module.jsm"
 );
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-var mozmill = ChromeUtils.import(
-  "resource://testing-common/mozmill/mozmill.jsm"
-);
 var elementslib = ChromeUtils.import(
   "resource://testing-common/mozmill/elementslib.jsm"
 );
 
 var systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
 
 var backstage = this;
 
@@ -93,16 +90,19 @@ var loadFile = function(path, collector)
   var uri = Services.io.newFileURI(file).spec;
 
   var module = new Cu.Sandbox(systemPrincipal, {
     wantGlobalProperties: ["ChromeUtils"],
   });
   module.registeredFunctions = registeredFunctions;
   module.collector = collector;
 
+  var mozmill = ChromeUtils.import(
+    "resource://testing-common/mozmill/mozmill.jsm"
+  );
   module.mozmill = mozmill;
   module.elementslib = elementslib;
   module.persisted = persisted;
   module.Cc = Cc;
   module.Ci = Ci;
   module.Cu = Cu;
   module.require = function(mod) {
     var loader = new securableModule.Loader({