Move app_tmpdir ($TMPDIR) to cache to allow users to free up space on their Android device
Categories
(GeckoView :: General, enhancement, P2)
Tracking
(relnote-firefox -, firefox89 fixed)
People
(Reporter: robwu, Assigned: agi)
References
Details
(Whiteboard: [geckoview:m89])
Attachments
(1 file)
bug 1532446 is an example where TmpD
has grown to an excessively large size, with no way for users to clean it up.
TmpD
is ultimately derived from $TMPDIR
, at https://searchfox.org/mozilla-central/rev/519f913527b0d9d5097d290d5731cff6b2991fe0/xpcom/io/SpecialSystemDirectory.cpp#434,452
Ideally, this directory should be cleared and the new location should be set to the cache
folder so that users can use "Clear Cache" on Android.
STR:
- Attach a debugger to Fenix (e.g. via
about:debugging
, inspect Main process). - Run
Cc["@mozilla.org/process/environment;1"].getService(Ci.nsIEnvironment).get('TMPDIR')
Expected:
/data/user/0/org.mozilla.firefox_beta/cache
(or any subdirectory of it)- (or any directory that can be cleared by users)
Actual:
/data/user/0/org.mozilla.firefox_beta/app_tmpdir
More info:
TMPDIR
is set at https://searchfox.org/mozilla-central/rev/519f913527b0d9d5097d290d5731cff6b2991fe0/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java#146,150getTmpDir
is defined at https://searchfox.org/mozilla-central/rev/519f913527b0d9d5097d290d5731cff6b2991fe0/mobile/android/geckoview/src/main/java/org/mozilla/gecko/mozglue/GeckoLoader.java#85-91- We should choose a new location in
cache/
and remove the old directory.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
esawin says there are other folders that are "temp" folders in Gecko.
Assignee | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
We do this so that users can clear it manually if it grows too large.
Updated•3 years ago
|
Pushed by asferro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eeb118d61855 Put tmp dir under app cache. r=droeh
Comment 4•3 years ago
|
||
bugherder |
Assignee | ||
Updated•3 years ago
|
Comment 5•3 years ago
•
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]: Resolves an issue with users reporting muli-GiB Firefox folders that could only be fixed by deleting all app data including bookmkarks and other user data
[Affects Firefox for Android]: only
[Suggested wording]: Certain websites and extensions caused Firefox to use a large amount of Android storage. The files have been moved to a user clearable cache.
[Links (documentation, blog post, etc)]: only this bug
Updated•3 years ago
|
Description
•