Bug 1667455 - Part 20: Remove Services.jsm from comments. r=kmag

Differential Revision: https://phabricator.services.mozilla.com/D150911
This commit is contained in:
Tooru Fujisawa 2022-07-11 12:41:56 +00:00
parent fd1c853524
commit af81b5300a
5 changed files with 8 additions and 12 deletions

View file

@ -30,7 +30,7 @@ importScripts("resource://gre/modules/workers/require.js");
// ChromeUtils is defined inside of a Worker, but we don't want the
// activity-stream.bundle.js to detect it when loading, since that results
// in it attempting to import `Services.jsm` on load, which is not allowed in
// in it attempting to import JSMs on load, which is not allowed in
// a Worker. So we temporarily clear ChromeUtils so that activity-stream.bundle.js
// thinks its being loaded in content scope.
//

View file

@ -9,7 +9,7 @@ const { TelemetrySession } = ChromeUtils.import(
);
// The @mozilla/xre/app-info;1 XPCOM object provided by the xpcshell test harness doesn't
// implement the nsIXULAppInfo interface, which is needed by Services.jsm and
// implement the nsIXULAppInfo interface, which is needed by Services and
// TelemetrySession.jsm. updateAppInfo() creates and registers a minimal mock app-info.
const { updateAppInfo } = ChromeUtils.import(
"resource://testing-common/AppInfo.jsm"

View file

@ -4,9 +4,8 @@
"use strict";
/*
* This can't be an xpcshell-test because, according to
* `toolkit/modules/Services.jsm`, "Not all applications implement
* nsIXULAppInfo (e.g. xpcshell doesn't)."
* This can't be an xpcshell-test because not all applications implement
* nsIXULAppInfo (e.g. xpcshell doesn't).
*/
const { ClientEnvironmentBase } = ChromeUtils.import(
"resource://gre/modules/components-utils/ClientEnvironment.jsm"

View file

@ -1296,10 +1296,9 @@ var gBlocklistLevel = DEFAULT_LEVEL;
* item - the nsIPluginTag or Addon object
*/
// From appinfo in Services.jsm. It is not possible to use the one in
// Services.jsm since it will not successfully QueryInterface nsIXULAppInfo in
// xpcshell tests due to other code calling Services.appinfo before the
// nsIXULAppInfo is created by the tests.
// It is not possible to use the one in Services since it will not successfully
// QueryInterface nsIXULAppInfo in xpcshell tests due to other code calling
// Services.appinfo before the nsIXULAppInfo is created by the tests.
XPCOMUtils.defineLazyGetter(lazy, "gApp", function() {
// eslint-disable-next-line mozilla/use-services
let appinfo = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULRuntime);

View file

@ -81,7 +81,7 @@ service(
"nsIMemoryReporterManager",
"@mozilla.org/memory-reporter-manager;1",
)
# If you want nsIXULAppInfo, as returned by Services.jsm, you need to call:
# If you want nsIXULAppInfo, as returned by Services, you need to call:
#
# nsCOMPtr<nsIXULRuntime> runtime = mozilla::services::GetXULRuntime();
# nsCOMPtr<nsIXULAppInfo> appInfo = do_QueryInterface(runtime);
@ -143,8 +143,6 @@ if buildconfig.substs.get("ENABLE_WEBDRIVER"):
# The following code consumes the data listed above to generate the files
# Services.h, Services.cpp, and services.rs which provide access to these
# service getters in both rust and C++ code.
#
# XXX(nika): would it be a good idea to unify Services.jsm into here too?
def services_h(output):