Commit Graph

86 Commits

Author SHA1 Message Date
Jens Stutte
3ea6b78b60 Bug 1832252 - Have a configurable minimum runtime for background tasks. r=nalexander
Background tasks are potentially very short living, such that things launched asynchronously during process startup might not have finished initializing when we are asked to shutdown.

In order to mitigate this, we introduce a configurable `backgroundTaskMinRuntimeMS` (default 500ms) that guarantees that a background task will last at least that time.

Documentation will be added in bug 1833198.

Differential Revision: https://phabricator.services.mozilla.com/D177879
2023-05-15 20:25:21 +00:00
Mark Banner
0fadbc1ec4 Bug 1829618 - Enable Prettier on json files (automatic fixes). r=perftest-reviewers,webcompat-reviewers,extension-reviewers,andi,desktop-theme-reviewers,pip-reviewers,devtools-reviewers,sync-reviewers,mossop,denschub,dao,sparky,robwu,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D176336
2023-05-09 16:14:51 +00:00
Kagami Sascha Rosylight
7981620429 Bug 1831631 - Do not explicitly suppress stdout/stderr for background tasks on Windows r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D177406
2023-05-09 11:03:31 +00:00
Kagami Sascha Rosylight
095363752a Bug 1831154 - Disable removeDirectory logging on non-debug builds r=nalexander
IMO it makes sense to have logs on debug builds even after shutdown.

Differential Revision: https://phabricator.services.mozilla.com/D176909
2023-05-05 16:59:37 +00:00
Nick Alexander
98d1c4c0c2 Bug 1804988 - Determine toast notification tag from experiment:branch slug in backgroundTaskMessage experiments. r=barret
This commit uses a "pull" approach, where the experiment details are
fished at presentation-time and the content `tag` updated.

A few notes:

- With this approach, the update function is pushed down to the leaf
  node (the toast notification presentation layer).  It would be nice to
  do this at the experiment layer, but that layer doesn't resolve the
  presentation layer at this time, so it would perhaps violate the
  abstraction to lift the work higher.

- No effort has been made to mark `tag` as invalid in the messaging
  experiment schemas.  At this time, there's no provision for fields
  accepted at the presentation layer (`ToastNotification.schema.json`)
  but not at the experiment layer aggregating
  presentations (`BackgroundTaskMessagingExperiment.schema.json`,
  `MessagingExperiment.schema.json`).  It's likely possible to arrange
  this but not worth the effort at this time.

- The actual tag displayed is not captured in the message as it flows
  through ASRouter.  This is not likely to pose a problem.

- The actual tag displayed might be `optin-...`, potentially
  complicating data analysis.  Since it's essentially impossible for
  regular users to opt-in to _background task_ messages, that's not a
  pressing concern.

Differential Revision: https://phabricator.services.mozilla.com/D164508
2022-12-14 18:52:34 +00:00
Nick Alexander
22708393ac Bug 1804825 - Skip test_backgroundtask_no_output.js under code coverage. r=marco
The code coverage harness outputs a line like:
```
[CodeCoverage] Setting handlers for process 10953.
```
in early startup, and it's not worth working around it.

Differential Revision: https://phabricator.services.mozilla.com/D164375
2022-12-12 17:28:26 +00:00
Nick Alexander
6f77fcf537 Bug 1768961 - Avoid logging from pingsender. r=nrishel
The main reason to do this is to avoid polluting developer's terminals
_after_ Firefox exits; regular users shouldn't see `pingsender`
logging at all.

It's not technically difficult to actually launch with null stdout and
stderr, but it is quite onerous: we have at least two ways to launch
processes (`LaunchApp` and `nsIProcess`), with platform specific
differences and implementation specific options.  This approach is at
least brief and easy to understand.

Differential Revision: https://phabricator.services.mozilla.com/D163153
2022-12-08 20:17:06 +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
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
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
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
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
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
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
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
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
770d26e84e Bug 1776514 - Allow background tasks to enable Nimbus and Firefox Messaging System. r=barret,bytesized
This commit does several things:

1.  It configures a new Nimbus feature and corresponding message group
    `backgroundTaskMessage`.

2.  It configures `Firefox Messaging Experiments` to use the new
    Nimbus feature in background tasks.  The existing Remote Settings
    collection `nimbus-desktop-experiments` continues to be used.

    These configurations are achieved by setting preferences in
    `backgroundtasks_browser.js`, which is applied on top of
    `firefox.js` prefs by the preference service.  These preferences
    apply to every background task.

3.  It implements functions for enabling Nimbus and the Firefox
    Messaging System (and Messaging Experiments) that can be used by
    arbitrary background tasks.

    It is assumed (but not enforced here) that such tasks will use
    non-ephemeral (persistent) profiles, so that Remote Settings
    incremental sync, Nimbus bucketing, and Messaging System message
    limits, function as expected.

4.  It adds a new `message` background task specifically for testing
    background task messages.  Invoke the testing task with command
    lines like `firefox --backgroundtask message ...`.

    To ease testing, the framework accepts `--url about:studies?...`
    arguments from the Experimenter Web UI to explicitly opt-in to
    specific experiment branches.

    This task is complicated because it is intended both for QA to
    manually invoke, but also to be used by automated tests.

Eventually the existing `backgroundupdate` task will use the new
functions, just as the testing `message` task does.

Differential Revision: https://phabricator.services.mozilla.com/D150521
2022-07-22 04:42:13 +00:00
Butkovits Atila
14acd83640 Backed out changeset e6ad35220e23 (bug 1776514) for causing failures at browser_all_files_referenced.js. CLOSED TREE 2022-07-22 07:06:35 +03:00
Nick Alexander
2d3f9c32f8 Bug 1776514 - Allow background tasks to enable Nimbus and Firefox Messaging System. r=barret,bytesized
This commit does several things:

1.  It configures a new Nimbus feature and corresponding message group
    `backgroundTaskMessage`.

2.  It configures `Firefox Messaging Experiments` to use the new
    Nimbus feature in background tasks.  The existing Remote Settings
    collection `nimbus-desktop-experiments` continues to be used.

    These configurations are achieved by setting preferences in
    `backgroundtasks_browser.js`, which is applied on top of
    `firefox.js` prefs by the preference service.  These preferences
    apply to every background task.

3.  It implements functions for enabling Nimbus and the Firefox
    Messaging System (and Messaging Experiments) that can be used by
    arbitrary background tasks.

    It is assumed (but not enforced here) that such tasks will use
    non-ephemeral (persistent) profiles, so that Remote Settings
    incremental sync, Nimbus bucketing, and Messaging System message
    limits, function as expected.

4.  It adds a new `message` background task specifically for testing
    background task messages.  Invoke the testing task with command
    lines like `firefox --backgroundtask message ...`.

    To ease testing, the framework accepts `--url about:studies?...`
    arguments from the Experimenter Web UI to explicitly opt-in to
    specific experiment branches.

    This task is complicated because it is intended both for QA to
    manually invoke, but also to be used by automated tests.

Eventually the existing `backgroundupdate` task will use the new
functions, just as the testing `message` task does.

Differential Revision: https://phabricator.services.mozilla.com/D150521
2022-07-22 03:16:43 +00:00
Butkovits Atila
1aa2668d63 Backed out changeset b083e38b2ed9 (bug 1776514) for causing failure at browser_all_files_referenced.js. CLOSED TREE 2022-07-22 01:49:04 +03:00
Nick Alexander
c455022de9 Bug 1776514 - Allow background tasks to enable Nimbus and Firefox Messaging System. r=barret,bytesized
This commit does several things:

1.  It configures a new Nimbus feature and corresponding message group
    `backgroundTaskMessage`.

2.  It configures `Firefox Messaging Experiments` to use the new
    Nimbus feature in background tasks.  The existing Remote Settings
    collection `nimbus-desktop-experiments` continues to be used.

    These configurations are achieved by setting preferences in
    `backgroundtasks_browser.js`, which is applied on top of
    `firefox.js` prefs by the preference service.  These preferences
    apply to every background task.

3.  It implements functions for enabling Nimbus and the Firefox
    Messaging System (and Messaging Experiments) that can be used by
    arbitrary background tasks.

    It is assumed (but not enforced here) that such tasks will use
    non-ephemeral (persistent) profiles, so that Remote Settings
    incremental sync, Nimbus bucketing, and Messaging System message
    limits, function as expected.

4.  It adds a new `message` background task specifically for testing
    background task messages.  Invoke the testing task with command
    lines like `firefox --backgroundtask message ...`.

    To ease testing, the framework accepts `--url about:studies?...`
    arguments from the Experimenter Web UI to explicitly opt-in to
    specific experiment branches.

    This task is complicated because it is intended both for QA to
    manually invoke, but also to be used by automated tests.

Eventually the existing `backgroundupdate` task will use the new
functions, just as the testing `message` task does.

Differential Revision: https://phabricator.services.mozilla.com/D150521
2022-07-21 21:31:13 +00:00
Iulian Moraru
df431be6b8 Backed out 3 changesets (bug 1780074, bug 1780347) for causing multiple failures. CLOSED TREE
Backed out changeset ee4c4d34816c (bug 1780347)
Backed out changeset a13d3939b98a (bug 1780074)
Backed out changeset 3bc739f7de43 (bug 1780074)
2022-07-20 14:57:48 +03:00
Mark Banner
9e59e52e55 Bug 1780074 - Migrate newtab consumers to use ESM imports directly. r=daleharvey,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D152114
2022-07-20 10:36:52 +00:00
Nick Alexander
ef96062919 Bug 1775132 - Part 2: Allow background tasks to have non-ephemeral persistent profiles. r=mossop
This is a little tricky since some behaviour must be in the profile
service while some is more naturally in the background tasks mechanism.
Essentially, some background tasks will have a consistent profile
location determined by their "profile prefix", which includes vendor,
installation hash, and background task name.  Right now, those tasks are
determined by their task name, but in the future we could make this more
flexible.

A few technical notes:

1.  I elected to not assume (or provide) a directory service provider
    in the relevant helper, mostly to ease future commits that might
    pull this functionality forward in the startup process.
2.  These background task profiles are placed in "Background Tasks
    Profiles" on relevant platforms (non-Unix and macOS), sibling to
    "Profiles".
3.  To avoid any possible vulnerability with predictable profile
    directories, these non-ephemeral background task profiles are
    salted.  An entry is placed in the `BackgroundTasksProfiles` section
    of `profiles.ini` mapping the profile prefix to the relative salted
    path.

Differential Revision: https://phabricator.services.mozilla.com/D149919
2022-07-13 20:12:12 +00:00
Nick Alexander
f3ccda3906 Bug 1775132 - Part 1: Make profile service select background task profile directory. r=mossop
This allows the profile service to handle `XRE_PROFILE_PATH`,
`--profile`, etc as normal before choosing a "default" background task
profile directory.

Differential Revision: https://phabricator.services.mozilla.com/D149918
2022-07-13 20:12:12 +00:00
Tooru Fujisawa
328d63ce7f Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Andreea Pavel
f009ba2983 Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa
b2feb1bee9 Bug 1777486 - Part 10: Migrate more XPCOMUtils.jsm consumer CLOSED TREE
Differential Revision: https://phabricator.services.mozilla.com/D151520
2022-07-11 16:25:35 +00:00
Tooru Fujisawa
48c568867c Bug 1667455 - Part 5: Stop importing Services.jsm from chrome-priv JS code, top-level single-line cases. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,pip-reviewers,twisniewski,m_kato,jdescottes,mconley,AlexandruIonescu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D150894
2022-07-11 12:41:50 +00:00
Nick Alexander
bc3f197c8b Bug 1775138 - Part 3: Consume default profile Firefox Messaging System targeting in background tasks. r=barret
The default browsing profile's targeting snapshot is read using the
standard `BackgroundTasksUtils.jsm` helpers, which allow setting the
profile location for testing.

The targeting snapshot is provided in the triggering context under
`defaultProfile`, allowing both the background task profile's
targeting (for things like current Firefox version and `currentDate`)
and the default browsing profile's targeting (for things like the
snapshot's `currentDate` and add-ons).

Differential Revision: https://phabricator.services.mozilla.com/D151090
2022-07-08 20:36:09 +00:00
Nick Alexander
6395b2359f Bug 1775138 - Part 2: Ensure ASRouterTargeting.Environment can be used in background tasks. r=barret
We take a simple approach:

1.  We add a test to verify that all getters succeed in background
    task mode (save for an exclusion list of getters that access
    non-local hosts).
2.  We make certain getters background task-aware: for example,
    because they require the `AddonsManager` or legacy Telemetry.

This will allow background tasks to access their own targeting as well
as a snapshot of the default profile's targeting.

Differential Revision: https://phabricator.services.mozilla.com/D151089
2022-07-08 20:36:09 +00:00
Geoff Lankow
caec1ded15 Bug 1777378 - Stop a toolkit test failing on Thunderbird because of a browser L10n file. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D150926
2022-07-04 23:04:36 +00:00
Nick Alexander
3039149f5a Bug 1775393 - Enable Fluent localization in background tasks. r=mossop
The chrome manifest flag parsing is not particularly flexible.  It's
easiest to duplicate the manifest entries rather than further adjust
the parser.

Differential Revision: https://phabricator.services.mozilla.com/D149950
2022-06-26 23:38:45 +00:00
Nick Alexander
f35db8eba8 Bug 1765628 - Test that launching many background tasks concurrently succeeds. r=nrishel
This verifies that stale temporary profile purging does not interfere
with concurrent temporary profile creation and locking.

Depends on D144775

Differential Revision: https://phabricator.services.mozilla.com/D144328
2022-05-04 18:21:07 +00:00
Nicholas Rishel
42bce43c49 Bug 1765628 - Don't delete recently created temporary profiles to avoid race between background task cleanup and background task profile locking. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D144775
2022-05-04 18:21:07 +00:00
Nick Alexander
dbbde84b58 Bug 1722777 - Test. r=bytesized
Depends on D140429

Differential Revision: https://phabricator.services.mozilla.com/D141069
2022-03-22 00:28:23 +00:00
Butkovits Atila
54be2abb66 Backed out changeset 5fc643cc5b17 (bug 1722777) for causing xpcshell failures. CLOSED TREE 2022-03-19 01:47:01 +02:00
Nicholas Rishel
58f4570e92 Bug 1757252 - Intialize NSS in "no DB" mode for background tasks. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D141305
2022-03-18 20:14:47 +00:00
Nick Alexander
ab166841a5 Bug 1722777 - Test. r=nrishel,bytesized
Differential Revision: https://phabricator.services.mozilla.com/D141069
2022-03-18 20:13:04 +00:00
Nick Alexander
c74dc57bf2 Bug 1675829 - Post: Make background tasks not persist cookie database. r=bytesized
Differential Revision: https://phabricator.services.mozilla.com/D140863
2022-03-18 04:20:03 +00:00
Nick Alexander
f24cb48487 Bug 1757229 - Ensure Telemetry::CanRecordExtended() is false in background tasks. r=janerik
Differential Revision: https://phabricator.services.mozilla.com/D141291
2022-03-17 15:45:56 +00:00
Nick Alexander
201953d2d2 Bug 1679443 - Add test ensuring profiles created by background tasks are (and remain) "slim". r=bytesized
There are a few ways that we could test this.  We could use the
profiler and "File IO" markers, a la
https://searchfox.org/mozilla-central/source/browser/base/content/test/performance/browser_startup_content_mainthreadio.js.
This would profile content that is transient, which could be good or
bad -- temporary files for atomic writes would show up for example.
But in fact there are profile contents created after the profiler is
shut down (including `Telemetry.ShutdownTime.txt`), so this approach
isn't sufficient.

Therefore we do the simpler thing: we simply don't remove the
temporary profile directory after the background task exits.

Differential Revision: https://phabricator.services.mozilla.com/D139909
2022-03-16 17:18:45 +00:00
Nick Alexander
5e08f60944 Bug 1686344 - Support --backgroundtask --jsdebugger (and --wait-for-jsdebugger). r=mossop,jdescottes
Background task mode is roughly equivalent to `xpcshell`, but inside
the regular browser startup flow.  There is no browser window (no
`Window` at all) and there should be no content processes.  It's
sufficient to treat it like `xpcshell`, with its own stripped-down
actor and a few tweaks to the integration points.

The structural changes in this commit keep `--backgroundtask` mode
slim in the regular case when the Devtools are *not* requested.  This
is reflected in the small changes needed to the
`browser_xpcom_graph_wait.js` test: loading the Devtools
unconditionally causes a huge amount of code to be loaded.  In order
to load the Devtools framework conditionally, we check for
Devtools-specific command line flags and delegate to Devtools when
appropriate.  In order to check the command line flags, we turn the
`BackgroundTasksManager` into an XPCOM service, which allows it to be
instantiated by XPCOM in order to handle the command line.

One final note: this leaves two XPCOM components, "backgroundtasks"
and "backgroundtasksmanager".  Why not combine them?  This is
technically possible but not attractive: we really do want a natural
place for native/C++ code ("backgroundtasks") and JavaScript code
("backgroundtasksmanager").

Differential Revision: https://phabricator.services.mozilla.com/D129771
2022-03-03 03:38:39 +00:00
Nick Alexander
218907f4b0 Bug 1753718 - Pre: Prefix child process stdout lines with PID>; add stdout line callback. r=bytesized
We may get multiple lines or incomplete lines from the pipe, so we
need to split the data and keep the leftover.  This makes debugging a
little more pleasant and allows for the consumer to react to stdout as
it is read.

Differential Revision: https://phabricator.services.mozilla.com/D138222
2022-02-10 20:12:26 +00:00
Nick Alexander
c41abc5d3f Bug 1737117 - Only process updates only for --backgroundtask backgroundupdate. r=bytesized
The aim is to avoid background tasks causing unexpected updates, as
happened when we tried to migrate `pingsender` to a Gecko background
task in Bug 1734262.  This commit makes it so that we only process
updates for the `backgroundupdate` task (and the test-only
`shouldprocessupdates` task).

Differential Revision: https://phabricator.services.mozilla.com/D133557
2021-12-14 07:00:59 +00:00
Nick Alexander
3c9849fc72 Bug 1737117 - Pre: Add a reason to "should process updates at startup" logic. r=bytesized
I've elected to rename the function from `Should...` to
`ShouldNot...`, but not to rename the various test files.  The
functionality under test is both "should" and "should not", so I think
the churn of renaming is not justified.

This rearranges the deck chairs to accommodate testing the new
functionality in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D133556
2021-12-14 07:00:59 +00:00