Bug 1702183 - Accommodate !MOZ_BACKGROUNDTASKS in UpdateService.jsm. r=application-update-reviewers,bytesized

This was simply oversight from Bug 1700987.

Differential Revision: https://phabricator.services.mozilla.com/D110597
This commit is contained in:
Nick Alexander 2021-04-01 19:34:28 +00:00
Родитель c0d7459c98
Коммит 70266578ce
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -2547,9 +2547,9 @@ UpdateService.prototype = {
observe: async function AUS_observe(subject, topic, data) {
// Background tasks do not notify any delayed startup notificatons. The
// intentional fallthrough blocks below make it awkward to define this locally.
let bts = Cc["@mozilla.org/backgroundtasks;1"].getService(
Ci.nsIBackgroundTasks
);
const bts =
"@mozilla.org/backgroundtasks;1" in Cc &&
Cc["@mozilla.org/backgroundtasks;1"].getService(Ci.nsIBackgroundTasks);
let isBackgroundTaskMode = bts && bts.isBackgroundTaskMode;
switch (topic) {