Closed Bug 1385274 Opened 7 years ago Closed 7 years ago

WebAuthnManager asserts when trying to resolve mPBackgroundCreationPromise twice

Categories

(Core :: DOM: Device Interfaces, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: ttaubert, Assigned: ttaubert)

References

Details

(Whiteboard: [webauthn])

Attachments

(1 file, 1 obsolete file)

Calling WebAuthnManager::GetOrCreateBackgroundActor() twice in a row (i.e. hitting the button on the test page like a maniac) can cause us to call mPBackgroundCreationPromise.Resolve() twice in a row, without an .Ensure() call in between that would refill mPromise. And thus we assert. As soon as we filled WebAuthnManager::mChild and it sticks around we actually don't need to create another WebAuthnTransactionChild. And we also don't always need to fire a BackgroundChild runnable.
This seems closer to the pattern other PBackground consumers use. And we don't assert anymore.
Attachment #8891345 - Flags: review?(jjones)
Some more cleanup.
Attachment #8891345 - Attachment is obsolete: true
Attachment #8891345 - Flags: review?(jjones)
Attachment #8891351 - Flags: review?(jjones)
Attachment #8891351 - Flags: review?(jjones) → review+
Pushed by ttaubert@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/ee929726e093 Don't try to resolve WebAuthnManager::mPBackgroundCreationPromise twice r=jcj
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: