mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 16:25:38 +00:00
Bug 1233016 - about:profiles should handle errors when the defaultProfile is not set, r=ehsan
This commit is contained in:
parent
d233600c4d
commit
c24cce8cb6
@ -62,13 +62,18 @@ function refreshUI() {
|
||||
parent.removeChild(parent.firstChild);
|
||||
}
|
||||
|
||||
let currentProfile = findCurrentProfile() || ProfileService.defaultProfile;
|
||||
let defaultProfile;
|
||||
try {
|
||||
defaultProfile = ProfileService.defaultProfile;
|
||||
} catch(e) {}
|
||||
|
||||
let currentProfile = findCurrentProfile() || defaultProfile;
|
||||
|
||||
let iter = ProfileService.profiles;
|
||||
while (iter.hasMoreElements()) {
|
||||
let profile = iter.getNext().QueryInterface(Ci.nsIToolkitProfile);
|
||||
display({ profile: profile,
|
||||
isDefault: profile == ProfileService.defaultProfile,
|
||||
isDefault: profile == defaultProfile,
|
||||
isCurrentProfile: profile == currentProfile });
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user