Bug 1036440 - Refactor and use async/await and withConnectionWrapper/promiseDBConnection in PlacesDBUtils, r=mak

Convert functions to async/await, and all DBConns to withConnectionWrapper
to make PlacesDBUtils as asynchronous as possible.
Replaces the `Tasks` object and `_executeTasks` method with a simpler mechanism
of waiting on the various (async) functions. The entire system of text based
logging using the prefixes ">", "+", "-" has been revamped so that `runTasks`,
'maintenanceOnIdle`and `checkAndFixDatabase` return a Map.

A method `getLegacyLog` is provided to convert this Map to the legacy logs.
The logs are structured slightly differently from the legacy logs, but the
prefix system is essentially the same. The current consumers of do not suffer
due to this change, while any new consumers should not use the method at all.

MozReview-Commit-ID: 9Fm7cFyFID3

--HG--
extra : rebase_source : ce3431bf1e82d7e87c5b584eeca521617c1c654d
This commit is contained in:
milindl 2017-05-19 23:45:40 +05:30
Родитель bc9c4a158e
Коммит b03686f5f1
1 изменённых файлов: 451 добавлений и 485 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу