Bug 1405030 - Fix loading of matrix.js r=clokep
authorFrédéric Wang <fred.wang@free.fr>
Mon, 02 Oct 2017 10:18:00 -0400
changeset 29164 b2ecd51acb470c37c75ac45dd58e7dea98c95993
parent 29163 bd0f723f1c32a6f9024af430a90620b1e744c96c
child 29165 36f25cc57854f72dcd88749a2a06da0f212c10b4
push id2068
push userclokep@gmail.com
push dateMon, 13 Nov 2017 19:02:14 +0000
treeherdercomm-beta@9c7e7ce8672b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersclokep
bugs1405030
Bug 1405030 - Fix loading of matrix.js r=clokep
chat/protocols/matrix/matrix-sdk.jsm
--- a/chat/protocols/matrix/matrix-sdk.jsm
+++ b/chat/protocols/matrix/matrix-sdk.jsm
@@ -4,17 +4,17 @@
 
 var {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/Console.jsm");
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/Timer.jsm");
 Cu.importGlobalProperties(["XMLHttpRequest"]);
 
-const { Loader, Require, Module } = Cu.import("resource://gre/modules/commonjs/toolkit/loader.js", {});
+const { Loader, Require, Module } = Cu.import("resource://devtools/shared/base-loader.js", {});
 
 this.EXPORTED_SYMBOLS = ["MatrixSDK"];
 
 // Set-up loading so require works properly in CommonJS modules.
 let matrixPath = "resource:///modules/matrix/";
 let loader = Loader({
   paths: {
       "": matrixPath,
@@ -101,10 +101,10 @@ let loader = Loader({
     setTimeout: setTimeout,
     clearTimeout: clearTimeout,
     location: { href: "" }, // workaround for browser-request's is_crossDomain
   }
 })
 
 let requirer = Module("matrix-module", "");
 let require = Require(loader, requirer);
-MatrixSDK = require("matrix.js");
+let MatrixSDK = require("matrix.js");
 MatrixSDK.request(require("browser-request"));