summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2022-04-18 17:01:41 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-04-18 17:01:41 -0500
commitbe1f005cffbb29b815a7aee659fb05bb32cb9793 (patch)
tree4c86c90ef347ab706efb0cbea76d0e63762ef84d
parent94cdb9cf08e0848afc901424498c4be5a2ae6d40 (diff)
downloadaura-central-be1f005cffbb29b815a7aee659fb05bb32cb9793.tar.gz
Issue #10 - Move Weave CommonUtils to its own JSM
-rw-r--r--components/reader/ReaderMode.jsm2
-rw-r--r--components/weave/content/aboutSyncTabs.js2
-rw-r--r--components/weave/moz.build1
-rw-r--r--components/weave/src/common/hawkrequest.js2
-rw-r--r--components/weave/src/common/logmanager.js2
-rw-r--r--components/weave/src/common/rest.js2
-rw-r--r--components/weave/src/crypto/utils.js2
-rw-r--r--components/weave/src/engines/prefs.js2
-rw-r--r--components/weave/src/stages/declined.js2
-rw-r--r--components/weave/src/sync/engines.js2
-rw-r--r--components/weave/src/sync/resource.js2
-rw-r--r--components/weave/src/sync/service.js2
-rw-r--r--components/weave/src/sync/userapi.js2
-rw-r--r--components/weave/src/sync/util.js2
-rw-r--r--dom/tests/mochitest/ajax/offline/offlineTests.js2
-rw-r--r--modules/ClientID.jsm2
-rw-r--r--modules/CommonUtils.jsm (renamed from components/weave/src/common/utils.js)0
-rw-r--r--modules/ProfileAge.jsm2
-rw-r--r--modules/SessionRecorder.jsm2
-rw-r--r--modules/moz.build1
-rw-r--r--system/security/manager/tools/genRootCAHashes.js2
21 files changed, 19 insertions, 19 deletions
diff --git a/components/reader/ReaderMode.jsm b/components/reader/ReaderMode.jsm
index a1d2c5643..262a1f823 100644
--- a/components/reader/ReaderMode.jsm
+++ b/components/reader/ReaderMode.jsm
@@ -28,7 +28,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.importGlobalProperties(["XMLHttpRequest"]);
-XPCOMUtils.defineLazyModuleGetter(this, "CommonUtils", "resource://services-common/utils.js");
+XPCOMUtils.defineLazyModuleGetter(this, "CommonUtils", "resource://gre/CommonUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "EventDispatcher", "resource://gre/modules/Messaging.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ReaderWorker", "resource://gre/modules/reader/ReaderWorker.jsm");
diff --git a/components/weave/content/aboutSyncTabs.js b/components/weave/content/aboutSyncTabs.js
index 410494b5b..dafb79b9d 100644
--- a/components/weave/content/aboutSyncTabs.js
+++ b/components/weave/content/aboutSyncTabs.js
@@ -4,7 +4,7 @@
var Cu = Components.utils;
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
Cu.import("resource://services-sync/main.js");
Cu.import("resource:///modules/PlacesUIUtils.jsm");
Cu.import("resource://gre/modules/PlacesUtils.jsm", this);
diff --git a/components/weave/moz.build b/components/weave/moz.build
index 9f7f9590f..35c98f16c 100644
--- a/components/weave/moz.build
+++ b/components/weave/moz.build
@@ -25,7 +25,6 @@ EXTRA_JS_MODULES['services-common'] += [
'src/common/rest.js',
'src/common/stringbundle.js',
'src/common/tokenserverclient.js',
- 'src/common/utils.js',
]
EXTRA_JS_MODULES['services-crypto'] += [
diff --git a/components/weave/src/common/hawkrequest.js b/components/weave/src/common/hawkrequest.js
index 454960b7b..ecedb0147 100644
--- a/components/weave/src/common/hawkrequest.js
+++ b/components/weave/src/common/hawkrequest.js
@@ -16,7 +16,7 @@ Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Log.jsm");
Cu.import("resource://services-common/rest.js");
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
Cu.import("resource://gre/modules/Credentials.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "CryptoUtils",
diff --git a/components/weave/src/common/logmanager.js b/components/weave/src/common/logmanager.js
index 17e47f9e3..c501229a9 100644
--- a/components/weave/src/common/logmanager.js
+++ b/components/weave/src/common/logmanager.js
@@ -15,7 +15,7 @@ XPCOMUtils.defineLazyModuleGetter(this, "Log",
XPCOMUtils.defineLazyModuleGetter(this, "OS",
"resource://gre/modules/osfile.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "CommonUtils",
- "resource://services-common/utils.js");
+ "resource://gre/CommonUtils.jsm");
Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/Task.jsm");
diff --git a/components/weave/src/common/rest.js b/components/weave/src/common/rest.js
index 5474dd947..22b2ebbba 100644
--- a/components/weave/src/common/rest.js
+++ b/components/weave/src/common/rest.js
@@ -15,7 +15,7 @@ Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Log.jsm");
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "CryptoUtils",
"resource://services-crypto/utils.js");
diff --git a/components/weave/src/crypto/utils.js b/components/weave/src/crypto/utils.js
index e3a77ad0a..17d6155fb 100644
--- a/components/weave/src/crypto/utils.js
+++ b/components/weave/src/crypto/utils.js
@@ -7,7 +7,7 @@ var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
this.EXPORTED_SYMBOLS = ["CryptoUtils"];
Cu.import("resource://services-common/observers.js");
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
this.CryptoUtils = {
diff --git a/components/weave/src/engines/prefs.js b/components/weave/src/engines/prefs.js
index 792e0c66a..1a61c517d 100644
--- a/components/weave/src/engines/prefs.js
+++ b/components/weave/src/engines/prefs.js
@@ -14,7 +14,7 @@ Cu.import("resource://services-sync/engines.js");
Cu.import("resource://services-sync/record.js");
Cu.import("resource://services-sync/util.js");
Cu.import("resource://services-sync/constants.js");
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
Cu.import("resource://gre/modules/LightweightThemeManager.jsm");
Cu.import("resource://gre/modules/Preferences.jsm");
diff --git a/components/weave/src/stages/declined.js b/components/weave/src/stages/declined.js
index ff8a14181..e74a45c6e 100644
--- a/components/weave/src/stages/declined.js
+++ b/components/weave/src/stages/declined.js
@@ -15,7 +15,7 @@ var {utils: Cu} = Components;
Cu.import("resource://services-sync/constants.js");
Cu.import("resource://gre/modules/Log.jsm");
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
Cu.import("resource://services-common/observers.js");
Cu.import("resource://gre/modules/Preferences.jsm");
diff --git a/components/weave/src/sync/engines.js b/components/weave/src/sync/engines.js
index edb406857..cdc6812e0 100644
--- a/components/weave/src/sync/engines.js
+++ b/components/weave/src/sync/engines.js
@@ -15,7 +15,7 @@ var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
Cu.import("resource://gre/modules/Async.jsm");
Cu.import("resource://gre/modules/Log.jsm");
Cu.import("resource://services-common/observers.js");
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
Cu.import("resource://services-sync/constants.js");
Cu.import("resource://services-sync/identity.js");
Cu.import("resource://services-sync/record.js");
diff --git a/components/weave/src/sync/resource.js b/components/weave/src/sync/resource.js
index f670a42a9..bc1d639f6 100644
--- a/components/weave/src/sync/resource.js
+++ b/components/weave/src/sync/resource.js
@@ -16,7 +16,7 @@ Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/Async.jsm");
Cu.import("resource://gre/modules/Log.jsm");
Cu.import("resource://services-common/observers.js");
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
Cu.import("resource://services-sync/constants.js");
Cu.import("resource://services-sync/util.js");
diff --git a/components/weave/src/sync/service.js b/components/weave/src/sync/service.js
index 804eb20cd..1ced636d1 100644
--- a/components/weave/src/sync/service.js
+++ b/components/weave/src/sync/service.js
@@ -21,7 +21,7 @@ const KEYS_WBO = "keys";
Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Log.jsm");
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
Cu.import("resource://services-sync/constants.js");
Cu.import("resource://services-sync/engines.js");
Cu.import("resource://services-sync/engines/clients.js");
diff --git a/components/weave/src/sync/userapi.js b/components/weave/src/sync/userapi.js
index e906440bd..4c3cdd43f 100644
--- a/components/weave/src/sync/userapi.js
+++ b/components/weave/src/sync/userapi.js
@@ -12,7 +12,7 @@ var {utils: Cu} = Components;
Cu.import("resource://gre/modules/Log.jsm");
Cu.import("resource://services-common/rest.js");
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
Cu.import("resource://services-sync/identity.js");
Cu.import("resource://services-sync/util.js");
diff --git a/components/weave/src/sync/util.js b/components/weave/src/sync/util.js
index 08e4e1dfc..b26d0837e 100644
--- a/components/weave/src/sync/util.js
+++ b/components/weave/src/sync/util.js
@@ -9,7 +9,7 @@ var {classes: Cc, interfaces: Ci, results: Cr, utils: Cu} = Components;
Cu.import("resource://gre/modules/Log.jsm");
Cu.import("resource://services-common/observers.js");
Cu.import("resource://services-common/stringbundle.js");
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
Cu.import("resource://gre/modules/Async.jsm", this);
Cu.import("resource://services-crypto/utils.js");
Cu.import("resource://services-sync/constants.js");
diff --git a/dom/tests/mochitest/ajax/offline/offlineTests.js b/dom/tests/mochitest/ajax/offline/offlineTests.js
index f239cd574..2aaf933e6 100644
--- a/dom/tests/mochitest/ajax/offline/offlineTests.js
+++ b/dom/tests/mochitest/ajax/offline/offlineTests.js
@@ -3,7 +3,7 @@ var Cc = SpecialPowers.Cc;
var Ci = SpecialPowers.Ci;
var Cu = SpecialPowers.Cu;
var LoadContextInfo = Cc["@mozilla.org/load-context-info-factory;1"].getService(Ci.nsILoadContextInfoFactory);
-var CommonUtils = Cu.import("resource://services-common/utils.js", {}).CommonUtils;
+var CommonUtils = Cu.import("resource://gre/CommonUtils.jsm", {}).CommonUtils;
const kNetBase = 2152398848; // 0x804B0000
var NS_ERROR_CACHE_KEY_NOT_FOUND = kNetBase + 61;
diff --git a/modules/ClientID.jsm b/modules/ClientID.jsm
index e29e1ee30..b72d01242 100644
--- a/modules/ClientID.jsm
+++ b/modules/ClientID.jsm
@@ -18,7 +18,7 @@ const LOGGER_NAME = "Toolkit.Telemetry";
const LOGGER_PREFIX = "ClientID::";
XPCOMUtils.defineLazyModuleGetter(this, "CommonUtils",
- "resource://services-common/utils.js");
+ "resource://gre/CommonUtils.jsm");
XPCOMUtils.defineLazyGetter(this, "gDatareportingPath", () => {
return OS.Path.join(OS.Constants.Path.profileDir, "datareporting");
diff --git a/components/weave/src/common/utils.js b/modules/CommonUtils.jsm
index c90600ef4..c90600ef4 100644
--- a/components/weave/src/common/utils.js
+++ b/modules/CommonUtils.jsm
diff --git a/modules/ProfileAge.jsm b/modules/ProfileAge.jsm
index f6030e2da..980ffb2dd 100644
--- a/modules/ProfileAge.jsm
+++ b/modules/ProfileAge.jsm
@@ -12,7 +12,7 @@ Cu.import("resource://gre/modules/Promise.jsm");
Cu.import("resource://gre/modules/osfile.jsm")
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/Log.jsm");
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
/**
* Profile access to times.json (eg, creation/reset time).
diff --git a/modules/SessionRecorder.jsm b/modules/SessionRecorder.jsm
index 174be08e3..6df4c197b 100644
--- a/modules/SessionRecorder.jsm
+++ b/modules/SessionRecorder.jsm
@@ -13,7 +13,7 @@ const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
Cu.import("resource://gre/modules/Preferences.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
Cu.import("resource://gre/modules/Log.jsm");
-Cu.import("resource://services-common/utils.js");
+Cu.import("resource://gre/CommonUtils.jsm");
// We automatically prune sessions older than this.
const MAX_SESSION_AGE_MS = 7 * 24 * 60 * 60 * 1000; // 7 days.
diff --git a/modules/moz.build b/modules/moz.build
index fb8d50c34..7561f2cef 100644
--- a/modules/moz.build
+++ b/modules/moz.build
@@ -42,6 +42,7 @@ EXTRA_JS_MODULES += [
'Battery.jsm',
'BinarySearch.jsm',
'BrowserUtils.jsm',
+ 'CommonUtils.jsm',
'CanonicalJSON.jsm',
'CertUtils.jsm',
'CharsetMenu.jsm',
diff --git a/system/security/manager/tools/genRootCAHashes.js b/system/security/manager/tools/genRootCAHashes.js
index 0d6f1df48..00d1fc67e 100644
--- a/system/security/manager/tools/genRootCAHashes.js
+++ b/system/security/manager/tools/genRootCAHashes.js
@@ -20,7 +20,7 @@ const CertDb = Components.classes[nsX509CertDB].getService(Ci.nsIX509CertDB);
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/FileUtils.jsm");
Cu.import("resource://gre/modules/NetUtil.jsm");
-const { CommonUtils } = Cu.import("resource://services-common/utils.js", {});
+const { CommonUtils } = Cu.import("resource://gre/CommonUtils.jsm", {});
const FILENAME_OUTPUT = "RootHashes.inc";
const FILENAME_TRUST_ANCHORS = "KnownRootHashes.json";