Closed Bug 1861002 Opened 2 years ago Closed 2 years ago

QuarantinedDomains._onUserAllowedPrefChanged should call onPropertyChanged addon listener when an AddonWrapper cannot be found

Categories

(WebExtensions :: General, defect, P3)

defect
Points:
1

Tracking

(firefox121 fixed)

RESOLVED FIXED
121 Branch
Tracking Status
firefox121 --- fixed

People

(Reporter: rpl, Assigned: rpl)

References

Details

(Whiteboard: [addons-jira])

Attachments

(1 file)

While reviewing logs emitted while running browser_ext_originControls.js (for reasons unrelated to this bugzilla issue) I noticed that the test was logging the following console warning:

[task 2023-10-25T02:05:28.319Z] 02:05:28 INFO - Console message: 1698199526725	addons.manager	WARN	AddonListener threw exception when calling onPropertyChanged: TypeError: can't access property "id", addon is null(resource://gre/modules/Extension.sys.mjs:640:52) JS Stack trace: onPropertyChanged@Extension.sys.mjs:640:52
[task 2023-10-25T02:05:28.319Z] 02:05:28 INFO - callAddonListeners@AddonManager.sys.mjs:1568:29
[task 2023-10-25T02:05:28.319Z] 02:05:28 INFO - callAddonListeners@AddonManager.sys.mjs:3800:45
[task 2023-10-25T02:05:28.319Z] 02:05:28 INFO - _onUserAllowedPrefChanged@ExtensionPermissions.sys.mjs:760:30
[task 2023-10-25T02:05:28.319Z] 02:05:28 INFO - async*clearUserPref@ExtensionPermissions.sys.mjs:701:20
[task 2023-10-25T02:05:28.319Z] 02:05:28 INFO - onUninstalled@Extension.sys.mjs:516:29
[task 2023-10-25T02:05:28.320Z] 02:05:28 INFO - callAddonListeners@AddonManager.sys.mjs:1568:29
[task 2023-10-25T02:05:28.320Z] 02:05:28 INFO - callAddonListeners@AddonManager.sys.mjs:3800:45
[task 2023-10-25T02:05:28.320Z] 02:05:28 INFO - uninstall@XPIInstall.jsm:4780:29
[task 2023-10-25T02:05:28.320Z] 02:05:28 INFO - uninstallAddon@XPIInstall.jsm:4819:9
[task 2023-10-25T02:05:28.320Z] 02:05:28 INFO - async*uninstall@XPIDatabase.jsm:1452:28
[task 2023-10-25T02:05:28.320Z] 02:05:28 INFO - shutdown@ExtensionTestCommon.sys.mjs:172:16
[task 2023-10-25T02:05:28.320Z] 02:05:28 INFO - receiveMessage@SpecialPowersParent.sys.mjs:1344:28
[task 2023-10-25T02:05:28.320Z] 02:05:28 INFO - JSActor query*unload@SpecialPowersChild.sys.mjs:2014:19
[task 2023-10-25T02:05:28.320Z] 02:05:28 INFO - originControlsInContextMenu/<@browser_ext_originControls.js:666:43
[task 2023-10-25T02:05:28.320Z] 02:05:28 INFO - originControlsInContextMenu@browser_ext_originControls.js:666:32
[task 2023-10-25T02:05:28.320Z] 02:05:28 INFO - async*originControls_in_unifiedExtensions_contextMenu@browser_ext_originControls.js:674:9

Technically this warning isn't introducing any particular issue as a side-effect of that exception being hit, the method that throws doesn't need to be called because it is only doing something needed while the addon is still installed and this error is only hit when the addon is already gone (uninstalled), but we should still prevent the exception from being hit to avoid the log spam (and it may also be potentially misleading if spotted while investigating issues, which would end up being unrelated to the exception this warning is pointing out).

Severity: -- → S4
Points: --- → 1
Priority: -- → P3
Whiteboard: [addons-jira]
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/e39859a83e6a QuarantinedDomains._onUserAllowedPrefChanged shouldn't call onPropertyChanged when no AddonWrapper is found. r=zombie
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: