Closed
Bug 1322797
Opened 8 years ago
Closed 6 years ago
nsIToolkitProfileService's selectedProfile description is a lie
Categories
(Toolkit :: Startup and Profile System, defect, P5)
Toolkit
Startup and Profile System
Tracking
()
RESOLVED
FIXED
mozilla67
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: Gijs, Assigned: mossop)
References
(Regressed 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
The description of selectedProfile is:
* The currently selected profile (the one used or about to be used by the
* browser).
This is not true. It always returns the default profile.
We should disambiguate it with defaultProfile (TBD how we resolve the conflict with naming of the existing defaultProfile attribute...) and have a property that returns a profile object for the actual currently running profile.
Comment 1•8 years ago
|
||
Hrmph. When it was built, nsIToolkitProfileService wasn't supposed to be available while Firefox was running; only while we were showing the profile manager UI. Since then we've hacked at it rather unsafely to be available while Firefox is running. "selected" doesn't mean anything while Firefox is running, since there is no UI/selection. We need to make sure that if we change anything here, the pre-startup behavior continues to be correct.
Priority: -- → P5
Assignee | ||
Comment 2•6 years ago
|
||
The current properties selectedProfile and defaultProfile are somewhat confusing
selectedProfile actually returns the default profile for the build and
defaultProfile returns the default profile for non-dev-edition builds. This
confusion leads to callers doing the wrong thing in some places.
What most code actually cares about is being able to set/get the default profile
for this build and getting the current profile in use. So this patch replaces
the previous properties with currentProfile and defaultProfile which do what
makes more sense.
This patch also switches from using the preprocessor to change behaviour for
dev-edition builds to using a boolean flag since some code was incorrectly
ignoring the setting to make dev-edition use the same profile as normal builds.
In order to make currentProfile correct when resetting a profile I had to move
CreateResetProfile into nsToolkitProfileService.
Pushed by dtownsend@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/35af79575f54
Replace selectedProfile with currentProfile and fix defaultProfile. r=froydnj, r=flod
Pushed by dtownsend@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d3b849c06ebc
Replace selectedProfile with currentProfile and fix defaultProfile. r=froydnj, r=flod
Comment 5•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox67:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Updated•6 years ago
|
Assignee: nobody → dtownsend
You need to log in
before you can comment on or make changes to this bug.
Description
•