Closed Bug 1703320 Opened 3 years ago Closed 3 years ago

Ensure Background Task is scheduled if and only if it ought to be scheduled

Categories

(Toolkit :: Application Update, defect)

defect

Tracking

()

VERIFIED FIXED
89 Branch
Tracking Status
firefox89 --- verified

People

(Reporter: bytesized, Assigned: bytesized)

References

Details

Attachments

(2 files)

Currently, we don't check if the task has been scheduled, we rely on a profile-level pref to tell us if we scheduled the task. But this can sometimes be wrong (for example, if Firefox was uninstalled and the task removed). We should check if the task has been scheduled to make sure that our internal state matches that of the task scheduler.

Also, if you find yourself in that situation, toggling the task off and on doesn't re-enable the task. When the task isn't in the expected state, interacting with it improperly throws an exception and the cached prefs don't get updated properly. So we should make sure that our solution addresses this issue as well.

Pushed by ksteuber@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b20d80f3ba82
Add interface to allow task existence to be queried r=nalexander
https://hg.mozilla.org/integration/autoland/rev/546270d901db
Ensure Background Task is scheduled if and only if it ought to be scheduled r=nalexander,application-update-reviewers

Verified fixed on Windows 10 and Windows 7 with the latest Nightly (2021-04-09)

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: