Hi everyone!
https://bugzilla.mozilla.org/show_bug.cgi?id=1667455 is going to remove
Services.jsm and define `Services` global property on all privileged globals.
That means the statement like the following is no longer necessary (and doesn't
work) once the patch lands.
const { Services } =
ChromeUtils.import("resource://gre/modules/Services.jsm");
Also, sandboxes will get `Services` global property if `wantComponents` option
is true (it defaults to true).
If there's any out-of-tree code that needs to support both before/after binary,
you could do something like the following
const Services = globalThis.Services ||
ChromeUtils.import("resource://gre/modules/Services.jsm").Services;
--
You received this message because you are subscribed to the Google Groups
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/CAEE9E10-F4F1-46D8-AFF8-A6A9920FF489%40gmail.com.