Commit Graph

179 Commits

Author SHA1 Message Date
Nika Layzell
d940dc2323 Bug 1793463 - Part 5: Stop using contractids to fetch protocol handlers, r=necko-reviewers,xpcom-reviewers,webdriver-reviewers,whimboo,valentin,kmag
This patch replaces the previous ContractID-based lookup system for protocol
handlers, and replaces it with a new custom system in nsIOService. It will be
pre-populated with non-overridable static protocol handlers using the
StaticComponents infrastructure added in the previous part, and callers can
also dynamically register new protocol handlers at runtime.

This new system is intended to provide access to the default port and
non-dynamic protocol flags off-main-thread, by requiring these values to be
provided up-front as constants, rather than getting them from the xpcom
interface. The data is then guarded by an RWLock.

Callers which look up specific handlers by their contractID are not changed, as
the contract IDs for existing handlers have not been changed, so the lookup
will still succeed.

This change as-implemented breaks the nsGIOProtocolHandler on Linux, as it
removes the special code which would try to use that handler for some
protocols. This will be fixed in a later part by making the
nsGIOProtocolHandler use the dynamic registration APIs to register and
un-register protocol handlers at runtime in response to the GIO pref.

Differential Revision: https://phabricator.services.mozilla.com/D162804
2022-12-01 15:43:19 +00:00
Marian-Vasile Laza
bf84df153e Backed out 7 changesets (bug 1793463) for causing bustages on nsIOService.cpp. CLOSED TREE
Backed out changeset 47c3acb30de2 (bug 1793463)
Backed out changeset 71afe900eb17 (bug 1793463)
Backed out changeset d168599a269e (bug 1793463)
Backed out changeset d0f18d300818 (bug 1793463)
Backed out changeset a116e6f089f2 (bug 1793463)
Backed out changeset eba1123c8b56 (bug 1793463)
Backed out changeset 68a3eb8a3057 (bug 1793463)
2022-12-01 02:30:02 +02:00
Nika Layzell
0b42e21ba9 Bug 1793463 - Part 5: Stop using contractids to fetch protocol handlers, r=necko-reviewers,xpcom-reviewers,webdriver-reviewers,whimboo,valentin,kmag
This patch replaces the previous ContractID-based lookup system for protocol
handlers, and replaces it with a new custom system in nsIOService. It will be
pre-populated with non-overridable static protocol handlers using the
StaticComponents infrastructure added in the previous part, and callers can
also dynamically register new protocol handlers at runtime.

This new system is intended to provide access to the default port and
non-dynamic protocol flags off-main-thread, by requiring these values to be
provided up-front as constants, rather than getting them from the xpcom
interface. The data is then guarded by an RWLock.

Callers which look up specific handlers by their contractID are not changed, as
the contract IDs for existing handlers have not been changed, so the lookup
will still succeed.

This change as-implemented breaks the nsGIOProtocolHandler on Linux, as it
removes the special code which would try to use that handler for some
protocols. This will be fixed in a later part by making the
nsGIOProtocolHandler use the dynamic registration APIs to register and
un-register protocol handlers at runtime in response to the GIO pref.

Differential Revision: https://phabricator.services.mozilla.com/D162804
2022-11-30 18:13:43 +00:00
Kagami Sascha Rosylight
4c820e2e6b Bug 1788986 - Part 1: Convert BackgroundTasksRunner as an XPCOM component r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D160674
2022-11-25 19:50:29 +00:00
Barret Rennie
0fb8313b89 Bug 1541508 - Use Services.env in toolkit/ r=Gijs,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D160149
2022-11-25 19:09:11 +00:00
Kagami Sascha Rosylight
028efdcca1 Bug 1763193 - Add TestUtils.assertOnPackagedBuild and use it on browser_all_files_referenced.js etc. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D162441
2022-11-21 15:02:21 -05:00
Cristian Tuns
6777944872 Backed out changeset 1e4df7ce5341 (bug 1763193) for causing bc failures on browser_startup_mainthreadio.js CLOSED TREE 2022-11-21 14:13:07 -05:00
Kagami Sascha Rosylight
1e40fad087 Bug 1763193 - Add TestUtils.assertOnPackagedBuild and use it on browser_all_files_referenced.js etc. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D162441
2022-11-21 16:53:14 +00:00
Mark Banner
51ace04b44 Bug 1799314 - Convert consumers of testing modules to import ES modules direct (toolkit/). r=mossop,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D161910
2022-11-17 12:00:29 +00:00
Mathieu Leplatre
5901faf6e0 Bug 1794411 - Add option to force a sync in .get() r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D159026
2022-11-11 12:08:02 +00:00
Kagami Sascha Rosylight
d9d87c2afa Bug 1791675 - Part 4: Make sure purgeHTTPCache runs after shutdown r=webdriver-reviewers,necko-reviewers,valentin,nalexander,whimboo
This adds BackgroundTasksRunner utility class as a generic way to properly run background tasks. A few argument for not extending existing BackgroundTasksUtils:

1. Simply because the existing use case is in C++.
2. I have another use case from JSM and thus I'll ultimately convert this an XPCOM component. And `CacheFileIOManager::DispatchPurgeTask` cannot get a JSM-written XPCOM instance which is required to be main-thread only.

Depends on D157998

Differential Revision: https://phabricator.services.mozilla.com/D157757
2022-11-08 15:42:24 +00:00
Cristian Tuns
c3ffdd5df6 Backed out 19 changesets (bug 1541508) for causing xpcshell failures on test_notHeadlessByDefault.js CLOSED TREE
Backed out changeset 08476fa2bc27 (bug 1541508)
Backed out changeset 0bf7514845db (bug 1541508)
Backed out changeset aa612a5e9ef7 (bug 1541508)
Backed out changeset 6bb9360473f7 (bug 1541508)
Backed out changeset b3d8e92f50c2 (bug 1541508)
Backed out changeset fa40dded133e (bug 1541508)
Backed out changeset 2e7db4aa8d4f (bug 1541508)
Backed out changeset 6098e2eb62ea (bug 1541508)
Backed out changeset 2c599ee639c4 (bug 1541508)
Backed out changeset 7d44f6e2644c (bug 1541508)
Backed out changeset c1279c3d674c (bug 1541508)
Backed out changeset 8bd08a62a590 (bug 1541508)
Backed out changeset 740010cb005c (bug 1541508)
Backed out changeset 0bfc7dd85c62 (bug 1541508)
Backed out changeset c4374a351356 (bug 1541508)
Backed out changeset 44ccfeca7364 (bug 1541508)
Backed out changeset e944e706a523 (bug 1541508)
Backed out changeset 2c59d66f43e4 (bug 1541508)
Backed out changeset a1896eacb6f1 (bug 1541508)
2022-11-01 22:38:52 -04:00
Barret Rennie
9a6687c538 Bug 1541508 - Use Services.env in toolkit/ r=Gijs,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D160149
2022-11-02 02:08:58 +00:00
Mark Banner
4a676b22bb Bug 1797686 - Convert subprocess import consumers to import ES modules directly. r=kmag,application-update-reviewers,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D160489
2022-10-27 20:17:39 +00:00
Mark Banner
17403914cb Bug 1795880 - Add an ESLint rule to enforce using static imports where possible. r=arai,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D160131
2022-10-26 09:37:46 +00:00
Mark Banner
202eb0e802 Bug 1795322 - Update toolkit modules references in toolkit code. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D160033
2022-10-26 08:06:36 +00:00
Kirk Steuber
8bbbac70d4 Bug 1727820 - Change nsIUpdateChecker consumers to use the new interface r=bhearsum
This patch misses one notable nsIUpdateChecker consumer: AppUpdater. This patch stack makes major changes to AppUpdater, so those changes will be made in their own patch later in this patch stack.

Differential Revision: https://phabricator.services.mozilla.com/D159295
2022-10-26 07:44:31 +00:00
Iulian Moraru
902802bebe Backed out 18 changesets (bug 1727820) for causing mochitest failures. CLOSED TREE
Backed out changeset 04a0c1cbeeb3 (bug 1727820)
Backed out changeset a6633d97ba02 (bug 1727820)
Backed out changeset dd7cd58bdf72 (bug 1727820)
Backed out changeset 06b53d536ef1 (bug 1727820)
Backed out changeset 2cbec56223e5 (bug 1727820)
Backed out changeset 7ccc00d36f16 (bug 1727820)
Backed out changeset 023595d9cb76 (bug 1727820)
Backed out changeset 3dafccf3cf28 (bug 1727820)
Backed out changeset c60b9a6a79ce (bug 1727820)
Backed out changeset 9bbb0f0f1caf (bug 1727820)
Backed out changeset 6d8cf5f78de8 (bug 1727820)
Backed out changeset 8ed9a62d4c5a (bug 1727820)
Backed out changeset d429cf593dae (bug 1727820)
Backed out changeset 67ba1beb529a (bug 1727820)
Backed out changeset 15762d60d97e (bug 1727820)
Backed out changeset 04f5ad71363a (bug 1727820)
Backed out changeset 137f1da67f91 (bug 1727820)
Backed out changeset 5b91828ded9b (bug 1727820)
2022-10-26 01:25:06 +03:00
Csoregi Natalia
5edbe31601 Backed out 12 changesets (bug 1795322) for causing multiple failures e.g. test_deletion_request_ping.py. CLOSED TREE
Backed out changeset aba25cbcda51 (bug 1795322)
Backed out changeset a4a35005ada9 (bug 1795322)
Backed out changeset 8e8d790eb0f4 (bug 1795322)
Backed out changeset db8903454bd3 (bug 1795322)
Backed out changeset 60cc71c61cad (bug 1795322)
Backed out changeset bc6a674994ad (bug 1795322)
Backed out changeset 6ac8a611f8c7 (bug 1795322)
Backed out changeset 9fb873ecfb31 (bug 1795322)
Backed out changeset c8a7a40c2a2f (bug 1795322)
Backed out changeset f2c118b6c6ce (bug 1795322)
Backed out changeset 38df43b4a70f (bug 1795322)
Backed out changeset 89aea8373411 (bug 1795322)
2022-10-25 23:47:58 +03:00
Mark Banner
1998acbb9e Bug 1795322 - Update toolkit modules references in toolkit code. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D160033
2022-10-25 19:49:27 +00:00
Kirk Steuber
c6ba4aa673 Bug 1727820 - Change nsIUpdateChecker consumers to use the new interface r=bhearsum
This patch misses one notable nsIUpdateChecker consumer: AppUpdater. This patch stack makes major changes to AppUpdater, so those changes will be made in their own patch later in this patch stack.

Differential Revision: https://phabricator.services.mozilla.com/D159295
2022-10-25 18:10:18 +00:00
Tooru Fujisawa
308f8402e5 Bug 1795873 - Part 2: Monitor ChromeUtils.importESModule static import in browser_xpcom_graph_wait.js. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D159921
2022-10-25 07:02:37 +00:00
Norisz Fay
11a2b4ece2 Backed out 18 changesets (bug 1727820) for causing mochitest failures on browser_updateAsk.js CLOSED TREE
Backed out changeset 577d5618fcd1 (bug 1727820)
Backed out changeset 9e6a904ec81d (bug 1727820)
Backed out changeset d95a38c6e8b4 (bug 1727820)
Backed out changeset dc9b7d7e97ae (bug 1727820)
Backed out changeset 464b501ae051 (bug 1727820)
Backed out changeset 9729c6dd1aac (bug 1727820)
Backed out changeset 3c67eac7d52e (bug 1727820)
Backed out changeset 7c2a0dfca2d2 (bug 1727820)
Backed out changeset 2021fb0cba9e (bug 1727820)
Backed out changeset 7a02de8e6ca6 (bug 1727820)
Backed out changeset 6e9017360297 (bug 1727820)
Backed out changeset 0bfff694ce96 (bug 1727820)
Backed out changeset 746d1c708507 (bug 1727820)
Backed out changeset 3b14d8d1fb94 (bug 1727820)
Backed out changeset c8a1417f3528 (bug 1727820)
Backed out changeset 69ef434ae92c (bug 1727820)
Backed out changeset ad646b770b07 (bug 1727820)
Backed out changeset 18b9dd91761f (bug 1727820)
2022-10-25 05:31:39 +03:00
Kirk Steuber
80f78afa02 Bug 1727820 - Change nsIUpdateChecker consumers to use the new interface r=bhearsum
This patch misses one notable nsIUpdateChecker consumer: AppUpdater. This patch stack makes major changes to AppUpdater, so those changes will be made in their own patch later in this patch stack.

Differential Revision: https://phabricator.services.mozilla.com/D159295
2022-10-24 20:53:21 +00:00
Marian-Vasile Laza
082c8bc92d Backed out 3 changesets (bug 1795873, bug 1796539) as req by the dev (arai). CLOSED TREE
Backed out changeset de1917baf71d (bug 1796539)
Backed out changeset 8326cc71c2dd (bug 1795873)
Backed out changeset 292542f833fe (bug 1795873)
2022-10-24 16:05:20 +03:00
Tooru Fujisawa
798f6d431a Bug 1795873 - Part 2: Monitor ChromeUtils.importESModule static import in browser_xpcom_graph_wait.js. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D159921
2022-10-24 12:22:31 +00:00
Mark Banner
58fde31146 Bug 1795722 - Fix browser_xpcom_graph_wait.js when running it outside of CI. r=barret
Differential Revision: https://phabricator.services.mozilla.com/D159516
2022-10-22 07:23:28 +00:00
Kagami Sascha Rosylight
313e7c6f5e Bug 1796085 - Part 2: Rename _purgeHTTPCache as _removeDirectory r=valentin,necko-reviewers
This background task currently is generic enough that it can be reused for other components, namely QuotaCleaner in the child patches. Renaming makes it clear that it's generic.

Differential Revision: https://phabricator.services.mozilla.com/D156912
2022-10-19 12:04:09 +00:00
Mark Banner
c22552a3de Bug 1795370 - Add nsICrashReporter as an interface on nsAppRunner. r=gsvelto
This fixes ESLint issues raised by mozilla/valid-services-properties.
This also changes follow-on issues to use Services.appinfo rather than getService.

Differential Revision: https://phabricator.services.mozilla.com/D159461
2022-10-18 18:22:24 +00:00
Mark Banner
5407bdffa8 Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Mark Banner
43be0848c3 Bug 1792341 - Migrate most of the rest of toolkit/modules/ to be system ES modules. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D158451
2022-10-18 11:21:25 +00:00
Kagami Sascha Rosylight
e8a261cad8 Bug 1784840 - Convert all background tasks to ESM r=nalexander,application-update-reviewers,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D156950
2022-10-15 18:24:37 +00:00
Nick Alexander
3bb11fef79 Bug 1793890 - Sync Nimbus recipe collection in background task mode. r=barret
Differential Revision: https://phabricator.services.mozilla.com/D158736
2022-10-06 19:12:38 +00:00
Mark Banner
a49b8ef78f Bug 1792365 - Convert toolkit/modules consumers to use ES module imports directly. r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,extension-reviewers,preferences-reviewers,desktop-theme-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,robwu,Gijs,sgalich,bytesized,AlexandruIonescu,dao,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158094
2022-09-29 06:52:34 +00:00
Mark Banner
94440c5a3a Bug 1792365 - Convert various toolkit/modules files to system ES modules. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D158093
2022-09-29 06:52:33 +00:00
Alexandre Poirot
0f32f335e3 Bug 1789201 - [devtools] Expose Services as a global to all DevTools modules. r=perftest-reviewers,nchevobbe,julienw,AlexandruIonescu
This will help transition to ES Modules as this symbol is exposed to them.

$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests

Differential Revision: https://phabricator.services.mozilla.com/D156401
2022-09-09 07:22:51 +00:00
Mark Banner
73631b4520 Bug 1789254 - Migrate enterprisepolicies consumers to use ESM imports directly. r=mkaply,necko-reviewers,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D156464
2022-09-08 14:40:07 +00:00
Mark Banner
be3e5b9f71 Bug 1789254 - Migrate enterprisepolicies (browser and toolkit) to ESM. r=mkaply
Differential Revision: https://phabricator.services.mozilla.com/D156463
2022-09-08 14:40:06 +00:00
Norisz Fay
6008f8d423 Backed out 3 changesets (bug 1789254) for causing bc failures on browser_xpcom_graph_wait.js CLOSED TREE
Backed out changeset bea1e1ba4a14 (bug 1789254)
Backed out changeset 4086aaa5f3d0 (bug 1789254)
Backed out changeset 131cac1d1146 (bug 1789254)
2022-09-08 17:14:00 +03:00
Mark Banner
e8c3c1e5b4 Bug 1789254 - Migrate enterprisepolicies consumers to use ESM imports directly. r=mkaply,necko-reviewers,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D156464
2022-09-08 12:43:32 +00:00
Nick Alexander
5025b0ded2 Bug 1781929 - Part 4: Pass through or launch Firefox from notification server. r=nrishel
When the notification server callback is executed by the Windows
notification system, it invokes Firefox with additional command line
parameters, most importantly the Windows-specific notification
"Windows tag".

If no appropriate Firefox is running, the command line will be
processed, the provided Windows tag will be inspected (and seen to not
be registered with this running Firefox instance) and a "launch URL"
stored as part of the Windows notification itself opened (if one is
provided).

If an appropriate Firefox is running, the remoting protocol will
forward this command line to the running instance.  If the instance
recognizes the provided `--notification-windowsTag`, the command line
will be ignored.  When the notification server exits, Windows will
fallback to the Windows 8.1 style notification callbacks registered
for this Windows tag and the existing (non notification server)
behaviour will occur.

In fact, the server therefore waits for a Windows tag-specific system
event to be signalled by the invoked Firefox (or a sibling process).
If we were to return `S_OK` from the notification server immediately,
and a running Firefox process would handle the notification via
Windows 8.1-style notification callbacks, then Windows would fall back
to those callbacks.  The invoked callbacks unregister themselves upon
completion, often before the launched Firefox has an opportunity to
process the command line.  By waiting for this system event, we allow
the invoked Firefox to process the command line while its own
notification callbacks are registered and therefore recognize that its
callbacks will handle the notification.

Differential Revision: https://phabricator.services.mozilla.com/D154468
2022-09-03 22:49:02 +00:00
Marian-Vasile Laza
48f9a164c7 Backed out 5 changesets (bug 1781929, bug 1784367) for causing bc test failures. CLOSED TREE
Backed out changeset 34003f6f7b27 (bug 1781929)
Backed out changeset 8e6fe1c18e8d (bug 1781929)
Backed out changeset e50432e37751 (bug 1781929)
Backed out changeset abf6eff708d8 (bug 1781929)
Backed out changeset 15fec49b7587 (bug 1784367)
2022-09-03 02:26:04 +03:00
Nick Alexander
6249d25e59 Bug 1781929 - Part 4: Pass through or launch Firefox from notification server. r=nrishel
When the notification server callback is executed by the Windows
notification system, it invokes Firefox with additional command line
parameters, most importantly the Windows-specific notification
"Windows tag".

If no appropriate Firefox is running, the command line will be
processed, the provided Windows tag will be inspected (and seen to not
be registered with this running Firefox instance) and a "launch URL"
stored as part of the Windows notification itself opened (if one is
provided).

If an appropriate Firefox is running, the remoting protocol will
forward this command line to the running instance.  If the instance
recognizes the provided `--notification-windowsTag`, the command line
will be ignored.  When the notification server exits, Windows will
fallback to the Windows 8.1 style notification callbacks registered
for this Windows tag and the existing (non notification server)
behaviour will occur.

In fact, the server therefore waits for a Windows tag-specific system
event to be signalled by the invoked Firefox (or a sibling process).
If we were to return `S_OK` from the notification server immediately,
and a running Firefox process would handle the notification via
Windows 8.1-style notification callbacks, then Windows would fall back
to those callbacks.  The invoked callbacks unregister themselves upon
completion, often before the launched Firefox has an opportunity to
process the command line.  By waiting for this system event, we allow
the invoked Firefox to process the command line while its own
notification callbacks are registered and therefore recognize that its
callbacks will handle the notification.

Differential Revision: https://phabricator.services.mozilla.com/D154468
2022-09-02 20:22:51 +00:00
Valentin Gosu
57b46200de Bug 1705676 - Ignore errors when closing stdin in BackgroundTasksTestUtils r=nalexander
Depends on D132165

Differential Revision: https://phabricator.services.mozilla.com/D153952
2022-08-15 07:07:46 +00:00
Nick Alexander
7e987a7e1b Bug 1784117 - Lift default profile targeting to Nimbus in background tasks. r=barret
This was oversight.  In background tasks, I took some care to provide
the snapshot of the default profile's targeting state to the Firefox
Messaging System, but it also needs to be provided to Nimbus to filter
experiments directly.

For expedience, I provide an extra targeting context object to
`ExperimentManager.onStartup`.

The targeting contexts for Nimbus proper and Firefox Messaging System
are somewhat independent; that's why the triggering context remains in
the invocation of `sendTriggerMessage`.

Depends on D154308

Differential Revision: https://phabricator.services.mozilla.com/D154309
2022-08-11 17:39:53 +00:00
Nick Alexander
3b07c53c57 Bug 1784117 - Pre: Fix typoes. r=barret,application-update-reviewers,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D154308
2022-08-11 17:39:53 +00:00
Nick Alexander
b5cdc9a2e8 Bug 1781952 - Pre: Fix typo. r=bytesized
Differential Revision: https://phabricator.services.mozilla.com/D152947
2022-08-05 03:51:55 +00:00
Barret Rennie
d8aa23c948 Bug 1782136 - Filter Nimbus recipes based on app ID r=emcminn,nalexander
Nimbus features can now specify a list of applications they support (defaulting
to firefox-desktop). Enrollment for a given recipe will only occur if the
application supports all the features listed in the experiment. This allows
Firefox Desktop and the background task service to have different sets of
features, which prevents Firefox from enrolling in backgroundTaskMessage
experiments and the background task service from enrolling in experiments
intended for Firefox Desktop.

Differential Revision: https://phabricator.services.mozilla.com/D153119
2022-08-04 21:43:15 +00:00
Barret Rennie
9e4607afa5 Bug 1772928 - Port osfile.jsm usage to IOUtils in toolkit/components/backgroundtasks/ r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D153709
2022-08-04 19:58:30 +00:00
Barret Rennie
aeb738dbd5 Bug 1782148 - Fix up imports of XPCOMUtils in ToastNotification code r=nalexander
This also removes the import of Services.jsm since it is no longer required as
of bug 1667455.

Differential Revision: https://phabricator.services.mozilla.com/D153130
2022-08-03 16:30:17 +00:00