Closed Bug 1596663 Opened 5 years ago Closed 5 years ago

Switch to async login search APIs to support GeckoView storage queries

Categories

(Toolkit :: Password Manager, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: MattN, Assigned: MattN)

References

Details

(Whiteboard: [passwords:storage])

Attachments

(6 files)

Most nsILoginManagerStorage APIs are synchronous (except for initialize, terminate, & getAllLoginsAsync) for legacy reasons but we need to switch the APIs used for capture/fill (not management) to be async to support async queries to GeckoView.

searchLogins is the main issue, maybe findLogins if the one consumer can't switch to the async searchLogins API.

We will need to keep the sync APIs for Thunderbird so the storage-json.js backend for desktop apps can simply delegate from the async to the sync API to preserve compatibility. The GeckoView backend would simply not implement the synchronous API as it should never be called.

We need to switch the APIs used for capture/fill (not management) to be async to support async queries a GeckoView login storage provider.

Update callers to await on the result.

Depends on D53149

The Promise type wasn't available to XPIDL when these were added.

Depends on D54138

Pushed by mozilla@noorenberghe.ca: https://hg.mozilla.org/integration/autoland/rev/a3d9094fbb28 Add searchLoginsAsync nsILoginManagerStorage method. r=sfoster https://hg.mozilla.org/integration/autoland/rev/c11b9109664e Use searchLoginsAsync in _searchAndDedupeLogins. r=sfoster https://hg.mozilla.org/integration/autoland/rev/8d7dab582ae4 Use searchLoginsAsync for login searches by guid. r=sfoster https://hg.mozilla.org/integration/autoland/rev/7aef5a5252b1 Convert LoginManagerStorage_json to a JS class. r=sfoster https://hg.mozilla.org/integration/autoland/rev/acb67bbe1545 Use `Promise` IDL return values instead of jsval in passwordmgr. r=sfoster https://hg.mozilla.org/integration/autoland/rev/8264925bfb7d Remove more passwordmgr references to `hostname`. r=sfoster
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: