Bug 1734396 - Use Utils.fetch to fetch x5u r=leplatrem

Differential Revision: https://phabricator.services.mozilla.com/D127660
This commit is contained in:
Rob Wu 2021-10-06 14:30:38 +00:00
parent 55e1e8e14a
commit bab8d4c04d

View File

@ -27,8 +27,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
Utils: "resource://services-settings/Utils.jsm",
});
XPCOMUtils.defineLazyGlobalGetters(this, ["fetch"]);
const TELEMETRY_COMPONENT = "remotesettings";
XPCOMUtils.defineLazyGetter(this, "console", () => Utils.log);
@ -860,7 +858,7 @@ class RemoteSettingsClient extends EventEmitter {
const {
signature: { x5u, signature },
} = metadata;
const certChain = await (await fetch(x5u)).text();
const certChain = await (await Utils.fetch(x5u)).text();
// Merge remote records with local ones and serialize as canonical JSON.
const serialized = await RemoteSettingsWorker.canonicalStringify(
records,