Closed Bug 808554 Opened 12 years ago Closed 7 years ago

Clean-up nsPlacesAutoComplete.js

Categories

(Toolkit :: Places, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: Yoric, Unassigned)

Details

The code of nsPlacesAutoComplete.js seems to have grown organically in places. Nothing we can't bear with, but if we decide to refactor it to further asynchronicity, with the risk of race conditions, as bug 791776 might require, it would be interesting to perform a set of minor changes that will simplify our life during the refactoring:

- not always consistent uses of |var| vs. |let|;
- use of properties set to |null| in the prototype/use of |delete| to reset properties to |null|/dynamic property creation on instances – all of which get in the way of the JIT;
- results of database requests addressed by row number rather than row name, which makes it harder to read;
- it might be interesting to rewrite asynchronous portions of the code in Task.js-style, which will make it easier to refactor it to make it even more asynchronous.
no more existing
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.