Closed
Bug 1142222
Opened 9 years ago
Closed 9 years ago
boolForKey returns false for undefined keys
Categories
(Firefox for iOS :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bnicholson, Assigned: bnicholson)
References
Details
Attachments
(1 file)
Working on the search suggestions opt in, I found the following line was always false: self.shouldShowSearchSuggestionsOptIn = prefs.boolForKey(ShowSearchSuggestionsOptIn) ?? true Turns out userDefaults.boolForKey never returns nil when the pref isn't defined, returning false instead. I then tried to add a simple nil assertion for undefined prefs, clearing prefs before each run in ProfilePrefsTests. That's where things got interesting since, for some reason, userDefaults.removePersistentDomainForName() simply has no effect for our app group. The workaround of manually removing each key works, but it's still unclear whether this is an iOS bug or our own.
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8576205 -
Flags: review?(nalexander)
Comment 2•9 years ago
|
||
Comment on attachment 8576205 [details] [review] Pull request Thanks. I explicitly tried to avoid this kind of coercion bullshit, and still failed :(
Attachment #8576205 -
Flags: review?(nalexander) → review+
Assignee | ||
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•