Closed Bug 1337822 Opened 9 years ago Closed 9 years ago

Make SearchEngines.getUnorderedBundledEngines more robust

Categories

(Firefox for iOS :: General, defect, P3)

Other
iOS
defect

Tracking

()

RESOLVED DUPLICATE of bug 1354934
Tracking Status
fxios 8.0+ ---

People

(Reporter: st3fan, Unassigned)

Details

(Whiteboard: [MobileCore])

Attachments

(2 files)

At the end of getUnorderedBundledEngines() there is a forced unwrap, which can trigger a crash if the call above to parser.parse() failed. It is better to not show the search engine than to crash.
Whiteboard: [MobileCore]
Assignee: sarentz → nobody
Attached file Pull Request
Attachment #8846830 - Flags: review?(etoop)
Comment on attachment 8846830 [details] [review] Pull Request The fix looks good, but as it's really hard to test I'd like to see a unit test added that demonstrates that the correct response of not adding the corrupted engine actually occurs.
Attachment #8846830 - Flags: review?(etoop) → feedback+
It's my understanding that if the parser.parse function can't parse the search engine it will return nil. Presumably if that function has a bug where it returns a malformed search engine, that would be a different bug. This fix just prevents ff from crashing when the parser can't parse a given search engine.
Priority: -- → P3
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: