Add a Gecko background task mode and `--backgroundtask` flag to allow running short-lived processes that perform maintenance
Categories
(Toolkit :: Application Update, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox87 | --- | fixed |
People
(Reporter: nalexander, Assigned: nalexander)
References
(Depends on 1 open bug, Blocks 3 open bugs)
Details
Attachments
(6 files, 9 obsolete files)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
Bug 1667276 - Part 3: Load a custom prefs file when running a background task. r?Mossop!,KrisWright!
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
This is a ticket for experimentation. We'd like to support something like firefox --backgroundtask update that would pump the UpdateService loop from the command line. Here's a place to hang work in progress.
| Assignee | ||
Comment 1•8 months ago
|
||
Obvious TODOs:
-
Use the static BackgroundTasks class rather than hardcoding the
changes to the manifest parser and to the static component
registration, so that regular Firefox still works. -
Make the static component registration futzing data driven.
Depends on D91372
| Assignee | ||
Comment 2•7 months ago
|
||
Depends on D91373
| Assignee | ||
Comment 3•7 months ago
|
||
Depends on D94209
| Assignee | ||
Comment 4•7 months ago
|
||
Depends on D94210
Comment 5•7 months ago
|
||
Adds a couple of useful APIs for background tasks. The main one is for safely
locking the profile so that data can be extracted and then unlocking it. A
second API allows for parsing the prefs file from the profile.
Comment 6•7 months ago
|
||
Depends on D95060
Comment 7•7 months ago
|
||
Depends on D95198
Comment 8•7 months ago
|
||
Depends on D95199
Comment 9•7 months ago
|
||
Depends on D95200
| Assignee | ||
Comment 10•7 months ago
|
||
Depends on D91373
| Assignee | ||
Comment 11•6 months ago
|
||
Depends on D95200
| Assignee | ||
Comment 12•6 months ago
|
||
Depends on D97509
| Assignee | ||
Comment 13•6 months ago
|
||
Depends on D97510
| Assignee | ||
Comment 14•6 months ago
|
||
Depends on D97511
| Assignee | ||
Comment 15•6 months ago
|
||
This establishes a high water mark for code loaded (even after a short
delay) by a background task that does nothing.
Code loaded here means:
-
Chrome JSMs imported using
ChromeUtils.import; -
XPCOM services, generally long-lived, loaded using
do_getService
orServices.*or an equivalent; -
XPCOM components defined in JavaScript and loaded via
chrome.manifestentries.
At this time background tasks do not load any of category 3. The
distinction is made because they are reported separately by Gecko.
Depends on D97512
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Comment 16•6 months ago
|
||
Comment on attachment 9184605 [details]
Bug 1667276: Disable persistent cookie storage when running background tasks.
Revision D95200 was moved to bug 1675829. Setting attachment 9184605 [details] to obsolete.
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Updated•6 months ago
|
Comment 17•4 months ago
|
||
Pushed by nalexander@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ab6f830f6e75 Pre: Disable the startup cache when running a background task. r=dthayer https://hg.mozilla.org/integration/autoland/rev/74580a0f2633 Pre: Disable extension manager in background tasks mode. r=mossop https://hg.mozilla.org/integration/autoland/rev/cf52687c4433 Part 1: Wire background task mode into Gecko startup. r=mossop https://hg.mozilla.org/integration/autoland/rev/60c2f2dbc676 Part 2: Add BackgroundTasksManager to invoke task defined in JS. r=mossop https://hg.mozilla.org/integration/autoland/rev/38c20196aabc Part 3: Load a custom prefs file when running a background task. r=mossop,KrisWright https://hg.mozilla.org/integration/autoland/rev/f970ef0897cd Post: Add test limiting the XPCOM graph of the no-op wait background task. r=mossop
Comment 18•4 months ago
•
|
||
Backed out for causing browser_all_files_referenced.js failures.
backout: https://hg.mozilla.org/integration/autoland/rev/06ee1ff0214b90a8b2689141d33e9d756b2351ae
failure log: https://treeherder.mozilla.org/logviewer?job_id=327785851&repo=autoland&lineNumber=2582
[task 2021-01-26T03:44:56.643Z] 03:44:56 INFO - indirectly whitelisted file: chrome://fxr/content/prefs.js used from chrome://fxr/content/prefs.html
[task 2021-01-26T03:44:56.644Z] 03:44:56 INFO - Buffered messages finished
[task 2021-01-26T03:44:56.648Z] 03:44:56 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/static/browser_all_files_referenced.js | there should be no unreferenced files - Got 4, expected +0
[task 2021-01-26T03:44:56.648Z] 03:44:56 INFO - Stack trace:
[task 2021-01-26T03:44:56.648Z] 03:44:56 INFO - chrome://mochikit/content/browser-test.js:test_is:1351
[task 2021-01-26T03:44:56.649Z] 03:44:56 INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_all_files_referenced.js:checkAllTheFiles:948
[task 2021-01-26T03:44:56.649Z] 03:44:56 INFO - Not taking screenshot here: see the one that was previously logged
[task 2021-01-26T03:44:56.650Z] 03:44:56 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/static/browser_all_files_referenced.js | unreferenced file: resource://gre/defaults/backgroundtasks/backgroundtasks.js -
[task 2021-01-26T03:44:56.650Z] 03:44:56 INFO - Stack trace:
[task 2021-01-26T03:44:56.651Z] 03:44:56 INFO - chrome://mochikit/content/browser-test.js:test_ok:1323
[task 2021-01-26T03:44:56.651Z] 03:44:56 INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_all_files_referenced.js:checkAllTheFiles:952
[task 2021-01-26T03:44:56.652Z] 03:44:56 INFO - Not taking screenshot here: see the one that was previously logged
Also failing: https://treeherder.mozilla.org/logviewer?job_id=327785366&repo=autoland&lineNumber=5074
Comment 19•4 months ago
|
||
Pushed by nalexander@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c673fff5bd85 Pre: Disable the startup cache when running a background task. r=dthayer https://hg.mozilla.org/integration/autoland/rev/1dcb2d1be264 Pre: Disable extension manager in background tasks mode. r=mossop https://hg.mozilla.org/integration/autoland/rev/62488ec634f9 Part 1: Wire background task mode into Gecko startup. r=mossop https://hg.mozilla.org/integration/autoland/rev/8d6f10d83c6b Part 2: Add BackgroundTasksManager to invoke task defined in JS. r=mossop https://hg.mozilla.org/integration/autoland/rev/1c8d51d2c90f Part 3: Load a custom prefs file when running a background task. r=mossop,KrisWright https://hg.mozilla.org/integration/autoland/rev/9ab334e527a5 Post: Add test limiting the XPCOM graph of the no-op wait background task. r=mossop
Comment 20•4 months ago
|
||
Backed out for causing failure on test_crash_backgroundtask_moz_crash.js.
Backout link: https://hg.mozilla.org/integration/autoland/rev/e379907d0452a34155518062e838b465f5e4a37c
Failure log: https://treeherder.mozilla.org/logviewer?job_id=328010578&repo=autoland&lineNumber=3050
Comment 21•4 months ago
|
||
Pushed by nalexander@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/68c50add73aa Pre: Disable the startup cache when running a background task. r=dthayer https://hg.mozilla.org/integration/autoland/rev/09db6a973d97 Pre: Disable extension manager in background tasks mode. r=mossop https://hg.mozilla.org/integration/autoland/rev/b238efac91b4 Part 1: Wire background task mode into Gecko startup. r=mossop https://hg.mozilla.org/integration/autoland/rev/14441979c730 Part 2: Add BackgroundTasksManager to invoke task defined in JS. r=mossop https://hg.mozilla.org/integration/autoland/rev/73f56e24b72c Part 3: Load a custom prefs file when running a background task. r=mossop,KrisWright https://hg.mozilla.org/integration/autoland/rev/0e0e6bbf6f79 Post: Add test limiting the XPCOM graph of the no-op wait background task. r=mossop
Comment 22•4 months ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/68c50add73aa
https://hg.mozilla.org/mozilla-central/rev/09db6a973d97
https://hg.mozilla.org/mozilla-central/rev/b238efac91b4
https://hg.mozilla.org/mozilla-central/rev/14441979c730
https://hg.mozilla.org/mozilla-central/rev/73f56e24b72c
https://hg.mozilla.org/mozilla-central/rev/0e0e6bbf6f79
| Assignee | ||
Comment 23•4 months ago
|
||
Updating the ticket title to be more representative of what we've actually landed.
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Updated•4 months ago
|
| Assignee | ||
Updated•4 months ago
|
| Comment hidden (Intermittent Failures Robot) |
Description
•