AddonUpdateChecker bypasses it cache, but doesn't inhibit writing to it

RESOLVED FIXED in mozilla23

Status

()

Toolkit
Add-ons Manager
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Unfocused, Assigned: Ritesh)

Tracking

unspecified
mozilla23
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [good first bug][mentor=bmcbride@mozilla.com][lang=js])

Attachments

(1 attachment)

Seems AddonUpdateChecker.jsm bypasses the cache when requesting the update manifest (using LOAD_BYPASS_CACHE), but doesn't inhibit writing to it. It should!

It sets LOAD_BYPASS_CACHE here:
http://hg.mozilla.org/mozilla-central/file/1c0e964bd620/toolkit/mozapps/extensions/AddonUpdateChecker.jsm#l414

It should also set INHIBIT_CACHING, like what is done in bug 866564 in LightweightThemeManager.jsm:
https://bugzilla.mozilla.org/page.cgi?id=splinter.html&bug=866564&attachment=742892
(Assignee)

Comment 1

4 years ago
I want to work on this bug. Do I need to just set the INHIBIT_CACHING flag (one line) or something else?

(In reply to Blair McBride [:Unfocused] (Back from the dead. Mostly.) from comment #0)
> Seems AddonUpdateChecker.jsm bypasses the cache when requesting the update
> manifest (using LOAD_BYPASS_CACHE), but doesn't inhibit writing to it. It
> should!
> 
> It sets LOAD_BYPASS_CACHE here:
> http://hg.mozilla.org/mozilla-central/file/1c0e964bd620/toolkit/mozapps/
> extensions/AddonUpdateChecker.jsm#l414
> 
> It should also set INHIBIT_CACHING, like what is done in bug 866564 in
> LightweightThemeManager.jsm:
> https://bugzilla.mozilla.org/page.cgi?id=splinter.
> html&bug=866564&attachment=742892
Yes, you just need to set that flag - a one line fix, like what the patch in bug 866564 is doing.
Assignee: nobody → ritesh.ked3
Status: NEW → ASSIGNED
(Assignee)

Comment 3

4 years ago
Created attachment 744048 [details] [diff] [review]
Just added flag for INHIBIT_CACHING
Comment on attachment 744048 [details] [diff] [review]
Just added flag for INHIBIT_CACHING

Review of attachment 744048 [details] [diff] [review]:
-----------------------------------------------------------------

Great - thanks Ritesh :)

One small thing that I'll fix up for you: Be careful with spaces versus tabs. We use 2 spaces to indent lines in Mozilla code, not tabs (I personally prefer tabs, but its best to be consistent with the rest of the code).
Attachment #744048 - Flags: review+
Landed on the fx-team branch, which will get merged into mozilla-central within a day or two:
https://hg.mozilla.org/integration/fx-team/rev/e8c1bde62025
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/e8c1bde62025
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.