-
Notifications
You must be signed in to change notification settings - Fork 883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] Fallback to default value correctly for optional preferences #26610
Conversation
For preferences with optional types, the container check was incorrectly casting to the full `ValueType` which itself was already optional instead of the optionally-erased `V` type which would cause a successful cast to an `Optional<V>.some(nil)` rather than to a proper `nil` value
Released in v1.75.29 |
Verification PASSED on
Using the STR/Cases outlined via brave/brave-browser#42320 (comment), reproduced the original issue by installing ScreenRecording_11-18-2024.23-20-18_1.MP4Using the same STR/Cases mentioned above, ensured that the issue wasn't occurring when installing ScreenRecording_11-18-2024.23-25-15_1.MP4 |
For preferences with optional types, the container check was incorrectly casting to the full
ValueType
which itself was already optional instead of the optionally-erasedV
type which would cause a successful cast to anOptional<V>.some(nil)
rather than to a propernil
valueResolves brave/brave-browser#42320
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: