Closed Bug 1569897 Opened 6 months ago Closed 6 months ago

FormAutoFill still leaks if the focused input is removed before closing the browser

Categories

(Toolkit :: Form Autofill, defect, P2)

70 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla70
Tracking Status
firefox70 --- verified

People

(Reporter: jdescottes, Assigned: jdescottes)

References

Details

Attachments

(1 file)

The fix I am landing in https://bugzilla.mozilla.org/show_bug.cgi?id=1566870 is not fixing all the leaks that we have with FormAutoFill in devtools.

This fix relies on receiving a focusout (blur) event to cleanup references on FormAutofillContent.jsm. However if the input is removed before being blurred, this event will never be received and we will still have a leak.

I now believe we should simply avoid keeping any non-weak reference on DOM elements in FormAutofillContent, rather than trying to add various hooks to cleanup the state.

Component: General → Form Autofill
Product: DevTools → Toolkit
Target Milestone: --- → mozilla70
Version: unspecified → 70 Branch

I think it would be good to have QA do a quick check that address autofill still works once this is resolved in case the test coverage misses something.

Flags: qe-verify+
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/23956b86e0b6
Only keep weak references on the active element from FormAutofillContent r=MattN
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED

Saw an error in the console JavaScript error: chrome://formautofill/content/FormAutofillFrameScript.js, line 86: Error: Unexpected event type focusout

Shouldn't we also remove https://searchfox.org/mozilla-central/rev/29cce9a2684ef64c4f1f996087da8b7545d31f65/browser/extensions/formautofill/content/FormAutofillFrameScript.js#63

Flags: needinfo?(jdescottes)
Regressions: 1570885

(In reply to Brendan Dahl [:bdahl] from comment #5)

Saw an error in the console JavaScript error: chrome://formautofill/content/FormAutofillFrameScript.js, line 86: Error: Unexpected event type focusout

Shouldn't we also remove https://searchfox.org/mozilla-central/rev/29cce9a2684ef64c4f1f996087da8b7545d31f65/browser/extensions/formautofill/content/FormAutofillFrameScript.js#63

Good catch! Filed Bug 1570885 to fix it.

Flags: needinfo?(jdescottes)

Hi,

I've verified that the address autofill still works as expected after the fix using Firefox Nightly 70.0a1(20190730215316).

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.