Use documentGlobal instead of the removed ownerGlobal in FormAutofillPreferences
Categories
(Toolkit :: Form Autofill, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr140 | --- | unaffected |
| firefox-esr153 | --- | wontfix |
| firefox155 | --- | wontfix |
| firefox156 | --- | wontfix |
| firefox157 | --- | wontfix |
| firefox158 | --- | fixed |
People
(Reporter: dao, Assigned: xz.ganbaruibro, Mentored)
References
(Regression)
Details
(Keywords: good-first-bug, regression, Whiteboard: [lang=js])
Attachments
(1 file)
|
Bug 2069515 - Use documentGlobal instead of the removed ownerGlobal in FormAutofillPreferences r=dao
48 bytes,
text/x-phabricator-request
|
Details | Review |
Filing as a good first bug to learn workflows.
Node.ownerGlobal was removed from JS in bug 2033243, which renamed it to documentGlobal. Reading .ownerGlobal now returns undefined instead of throwing, so a call site left behind is silent rather than broken.
FormAutofillPreferences.createPreferenceGroup still has one:
const win = document.ownerGlobal;
Services.obs.notifyObservers(win, "formautofill-preferences-initialized");
Replace document.ownerGlobal with document.documentGlobal.
The notification still fires, and both observers of it (in browser/components/preferences/config/passwords-autofill.mjs) take no arguments and ignore the subject, so nothing is broken today. The subject is simply undefined for anything that starts reading it.
This one is a landing race rather than an oversight: bug 2033243 converted this exact line on 2026-05-02, and bug 2022042 — written before the rename and landed five days after it — brought the old spelling back.
Link to the code:
https://searchfox.org/firefox-main/rev/298cf786229591e2159a3933605df11e07709d6f/toolkit/components/formautofill/FormAutofillPreferences.sys.mjs#55
To verify the fix:
./mach lint -l eslint toolkit/components/formautofill/FormAutofillPreferences.sys.mjs
./mach test browser/components/preferences/tests
Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html
Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.
Comment 1•24 days ago
|
||
Set release status flags based on info from the regressing bug 2033243
:emilio, since you are the author of the regressor, bug 2033243, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Comment 2•24 days ago
|
||
https://hg-edge.mozilla.org/mozilla-central/rev/132051d2f64d6c88e2dd99582d5e12f08f6f7f2f#l13.99 introduced ownerGlobal removing documentGlobal.
Updated•23 days ago
|
| Assignee | ||
Comment 3•19 days ago
|
||
Updated•19 days ago
|
Comment 4•18 days ago
|
||
Set release status flags based on info from the regressing bug 2022042
Comment 6•17 days ago
|
||
| bugherder | ||
Comment 7•17 days ago
|
||
The patch landed in nightly and beta is affected, along with ESR.
:xz.ganbaruibro, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta and ESR approvals.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox157and the ESR status flag(s) towontfix.
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 8•14 days ago
|
||
(In reply to BugBot [:suhaib / :marco] from comment #7)
The patch landed in nightly and beta is affected, along with ESR.
:xz.ganbaruibro, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta and ESR approvals.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox157and the ESR status flag(s) towontfix.For more information, please visit BugBot documentation.
This is a no-user-impact cleanup (observers ignore the notification subject), so I don't think an uplift to beta/ESR is needed.
Updated•13 days ago
|
Description
•