main.sys.mjs (835B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 export { lazy as Weave }; 6 7 const lazy = {}; 8 9 // We want these to be lazily loaded, which helps performance and also tests 10 // to not have these loaded before they are ready. 11 ChromeUtils.defineESModuleGetters(lazy, { 12 Service: "resource://services-sync/service.sys.mjs", 13 Status: "resource://services-sync/status.sys.mjs", 14 Svc: "resource://services-sync/util.sys.mjs", 15 Utils: "resource://services-sync/util.sys.mjs", 16 }); 17 18 ChromeUtils.defineLazyGetter(lazy, "Crypto", () => { 19 let { WeaveCrypto } = ChromeUtils.importESModule( 20 "moz-src:///services/crypto/modules/WeaveCrypto.sys.mjs" 21 ); 22 return new WeaveCrypto(); 23 });