Bug 1252287 - Repair gDevTools shim to use Services.jsm. r=ochameau
MozReview-Commit-ID: BKmaGubgLAd
--- a/devtools/client/shims/gDevTools.jsm
+++ b/devtools/client/shims/gDevTools.jsm
@@ -6,17 +6,17 @@
/**
* This file only exists to support add-ons which import this module at a
* specific path.
*/
const Cu = Components.utils;
-const Services = require("Services");
+const { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
const WARNING_PREF = "devtools.migration.warnings";
if (Services.prefs.getBoolPref(WARNING_PREF)) {
const { Deprecated } = Cu.import("resource://gre/modules/Deprecated.jsm", {});
Deprecated.warning("This path to gDevTools.jsm is deprecated. Please use " +
"Cu.import(\"resource://devtools/client/" +
"framework/gDevTools.jsm\") to load this module.",
"https://bugzil.la/912121");