Unnecessary duplicate update check for system addons
Categories
(Toolkit :: Add-ons Manager, enhancement, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: trishul.goel, Assigned: trishul.goel)
References
Details
Attachments
(2 files)
While performing backgroundUpdateCheck
for normal extensions, the function also checks updates for system addon ie, fetches update URL
https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/AddonManager.jsm#1286
which eventually it do not install because of
https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/AddonManager.jsm#1294
The system addons are updated only by updateSystemAddons
method
https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/AddonManager.jsm#1315
So this results in unnecessary request to update URLs of system addons.
Comment 1•6 years ago
|
||
We never actually get to checking for the CAN_UPGRADE permission since system addons don't have update URLs. We have a separate bug about avoiding warning about that (bug 1353934)
Hi @aswan,
Thanks for your review.
I think I may not have been able to explain correctly.
There are GET request to versioncheck-bg.addons.mozilla.org
for system addons (due to update check), which is of no use as we update system addons with different process and eventually leads to warnings mentioned in #1353934.
Please see the attachment. There are Requests to update system addons for example.
https://versioncheck-bg.addons.mozilla.org/update/VersionCheck.php?reqVersion=2&id=webcompat-reporter@mozilla.org&version=1.1.0&maxAppVersion=null&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}&appVersion=66.0a1&appOS=Darwin&appABI=x86_64-gcc3&locale=en-US¤tAppVersion=66.0a1&updateType=112&compatMode=normal
Since there is no update URL in webcompat-reporter@mozilla.org
it request update from URL in extensions.update.background.url
pref.
This return a blank object and hence the warning is generated as mentioned in #1353934.
The fix for this would be as simple as adding
if (addon.signedState === AddonManager.SIGNEDSTATE_SYSTEM) continue;
just when loop starts at https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/AddonManager.jsm#1286
Updated•6 years ago
|
Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bca8ef2bc43f
Remove system addons from update check of normal extensions. r=aswan
Updated•6 years ago
|
Comment 7•6 years ago
|
||
bugherder |
Description
•