Intermittent race between FormHistory and LoginManager after making nsILoginManager::removeAllLogins async
Categories
(Toolkit :: Password Manager, defect, P3)
Tracking
()
People
(Reporter: theidkamp, Unassigned)
Details
After changing nsILoginManager::removeAllLogins to the asynchronous removeAllLoginsAsync, we started seeing intermittent failures in this password manager test:
toolkit/components/passwordmgr/test/browser/browser_form_history_fallback.js
Specifically, the test
test_username_not_saved_in_form_history_when_password_manager_enabled
fails intermittently on try and in local runs.
Observed behavior:
From try logs with additional debug output, it appears that during form submission:
FormHistory processes the form submission before LoginManager has marked the username field as a login-managed/auto-completable field.
As a result, the username is added to FormHistory even though password manager saving is enabled and the field should be handled exclusively by LoginManager.
This ordering can be observed in the logs here:
https://treeherder.mozilla.org/logviewer?job_id=544881730&repo=try&task=Y4nQROdaQgKm3PPKPUw0Xw.0&lineNumber=5005
Expected behavior:
When password manager saving is enabled, username fields should be marked by LoginManager early enough so that FormHistory can reliably detect and skip them, regardless of whether LoginManager processing happens synchronously or asynchronously.
| Reporter | ||
Updated•8 months ago
|
| Reporter | ||
Updated•8 months ago
|
Description
•