Break out the profile selection logic from nsAppRunner.cpp

RESOLVED FIXED in Firefox 66

Status

()

enhancement
RESOLVED FIXED
5 months ago
4 months ago

People

(Reporter: mossop, Assigned: mossop)

Tracking

unspecified
mozilla66
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox66 fixed)

Details

Attachments

(1 attachment)

Moves the startup profile selection code from nsAppRunner.cpp to the profile manager.

Assignee

Comment 1

5 months ago
Currently nsAppRunner is responsible for choosing or creating a profile to use
at startup. It then has to create a reset profile if necessary and lock the
selected profile directories. But these latter things are done in different
places of the selection code and done in different ways, sometimes we delay
while trying to get the lock, sometimes we don't.

This patch moves the profile selection part of the code to its own function so
that then we only have to have one place that does the profile reset and
locking logic.

It makes a lot of sense to have the selection code live in the profile service.
It can use information from the database load to help make the choices and it
also means that we can expose the profile selection code through xpcom allowing
it to be easily automatically tested. It will also be more important for future
patches for the dedicated profiles feature.

Comment 2

5 months ago
Pushed by dtownsend@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/394b490d3e2d
Move startup profile selection to nsToolkitProfileService. r=froydnj

Comment 3

5 months ago
bugherder
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66

When building Firefox for Android I get

50:51.76 In file included from .../mozilla-unified/obj-i686-linux-android/toolkit/xre/Unified_cpp_toolkit_xre0.cpp:119:
50:51.76 .../mozilla-unified/toolkit/xre/nsXREDirProvider.cpp:22:10: fatal error: 'commonupdatedir.h' file not found

Dave, can you take a look?

Flags: needinfo?(dtownsend)

Created Bug 1520139 for these failures, please follow the progress over there. Thank you.

Updated

5 months ago
Depends on: 1520193

There's also bug 1520131.

Depends on: 1520131

Updated

5 months ago
No longer depends on: 1520193
Assignee

Updated

5 months ago
Depends on: 1522190
Assignee

Updated

5 months ago
No longer depends on: 1522190
Assignee

Updated

5 months ago
Flags: needinfo?(dtownsend)
Assignee

Updated

4 months ago
Depends on: 1525262
You need to log in before you can comment on or make changes to this bug.