Closed Bug 1500053 Opened 3 years ago Closed 3 years ago

Scope mistake in SqlFunctions.cpp

Categories

(Toolkit :: Places, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: mak, Assigned: mak)

References

Details

(Whiteboard: [fxsearch])

Attachments

(1 file)

:tcsc noted this bug in SqlFunctions, where we update a scoped variable, but then return the external one.

https://searchfox.org/mozilla-central/rev/eef79962ba73f7759fd74da658f6e5ceae0fc730/toolkit/components/places/SQLFunctions.cpp#90

It looks like we're missing a test for this branch.
Assignee: nobody → mak77
Status: NEW → ASSIGNED
Where do the tests for this stuff live? It seemed only indirectly tested as part of the autocomplete UI tests from what I could tell, it's totally possible I'm just missing it though (I've been poking around in this code as part of the rust places work).
I don't think there's a specific test for this SQL function, instead we have tests for the urlbar and the search field in the Library, that pretty much end up touching this.
If I read the code correctly, we can't test for this. The code above is an optimization, if the search char is not ascii, we can skip all the ascii chars quickly, and that's what this code does. Considered this code doesn't work we basically miss the optimization and we check char by char instead of skipping ascii.
Blocks: 1387780
https://hg.mozilla.org/mozilla-central/rev/a2df0d50925f
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.