Bug 1696276 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

After Bug 1695797, `firefox --backgroundtask ...` will not process updates when another instance of Firefox is running.  This ticket seeks to improves this experience yet further.

1.  We never want to display UI or raise a UAC prompt from a background task.  We should add a flag to the `updater` invocation in [`ProcessUpdates`](https://searchfox.org/mozilla-central/rev/f83c67b24fed1d677c5deafe7b31f5656c2656ec/toolkit/xre/nsAppRunner.cpp#4584) when we're in background task mode to ensure we do neither.

  I'm hopeful that the updater can just leave any `pending` update in place when it would show UI or a UAC prompt without major modifications.  But it's possible this work may require adding new exit codes or error status codes to the updater.

  It's also possible that we should add such a flag to other `updater` invocations when in background mode as well, since it's not clear to me if any _other_ invocations would show UI or a UAC prompt.  I think not, since they're all intended for use within a regular headed Firefox session.

2.  If we do have an update to process, we want to ensure that we don't launch a regular headed Firefox session, but instead we relaunch the background task (with any additional arguments).  This is managed by these [`gRestartArg*` parameters](https://searchfox.org/mozilla-central/rev/f83c67b24fed1d677c5deafe7b31f5656c2656ec/toolkit/xre/nsAppRunner.cpp#4584).  This may already Just Work.

For both of these things, arranging the test environment is probably the hardest part.  I'm hopeful that some of the existing AUS tests can be modified for these use cases.
After Bug 1695797, `firefox --backgroundtask ...` will not process updates when another instance of Firefox is running.  This ticket seeks to improves this experience yet further.

1.  We never want to display UI or raise a UAC prompt from a background task.  We should add a flag to the `updater` invocation in [`ProcessUpdates`](https://searchfox.org/mozilla-central/rev/f83c67b24fed1d677c5deafe7b31f5656c2656ec/toolkit/xre/nsAppRunner.cpp#4584) when we're in background task mode to ensure we do neither.

    I'm hopeful that the updater can just leave any `pending` update in place when it would show UI or a UAC prompt without major modifications.  But it's possible this work may require adding new exit codes or error status codes to the updater.

    It's also possible that we should add such a flag to other `updater` invocations when in background mode as well, since it's not clear to me if any _other_ invocations would show UI or a UAC prompt.  I think not, since they're all intended for use within a regular headed Firefox session.

2.  If we do have an update to process, we want to ensure that we don't launch a regular headed Firefox session, but instead we relaunch the background task (with any additional arguments).  This is managed by these [`gRestartArg*` parameters](https://searchfox.org/mozilla-central/rev/f83c67b24fed1d677c5deafe7b31f5656c2656ec/toolkit/xre/nsAppRunner.cpp#4584).  This may already Just Work.

For both of these things, arranging the test environment is probably the hardest part.  I'm hopeful that some of the existing AUS tests can be modified for these use cases.

Back to Bug 1696276 Comment 0