Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Import Services.jsm only when it's not available #980

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/experiments/proxyutils/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

/* globals ExtensionAPI, ExtensionCommon, Services, ExtensionPreferencesManager, ExtensionError, Preferences */
/* globals ExtensionAPI, ExtensionCommon, ExtensionPreferencesManager, ExtensionError, Preferences */

"use strict";

ChromeUtils.defineModuleGetter(this, "Services",
"resource://gre/modules/Services.jsm");
const Services =
globalThis.Services ||
ChromeUtils.import("resource://gre/modules/Services.jsm").Services;
ChromeUtils.defineModuleGetter(this, "Preferences",
"resource://gre/modules/Preferences.jsm");
ChromeUtils.defineModuleGetter(this, "UIState",
Expand Down