ExtensionPermissions.jsm uses deprecated FileUtils.getDir (main thread I/O on startup)
Categories
(WebExtensions :: General, defect)
Tracking
(firefox-esr68 unaffected, firefox-esr78 unaffected, firefox78 unaffected, firefox79 disabled, firefox80 fixed)
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox-esr78 | --- | unaffected |
firefox78 | --- | unaffected |
firefox79 | --- | disabled |
firefox80 | --- | fixed |
People
(Reporter: standard8, Assigned: agi)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression, Whiteboard: [fxperf:p2])
Attachments
(1 file)
This was introduced recently in bug . When running xpcshell-tests or starting up Firefox, I see:
11:00:30.678 DEPRECATION WARNING: Calling FileUtils.getDir(..., ..., true) causes main thread I/O and should be avoided especially during startup/shutdown
You may find more details about this deprecation at: https://bugzilla.mozilla.org/show_bug.cgi?id=921157
resource://gre/modules/FileUtils.jsm 81 FileUtils_getDir
resource://gre/modules/ExtensionPermissions.jsm 137 _init
resource://gre/modules/ExtensionPermissions.jsm 146 lazyInit
resource://gre/modules/ExtensionPermissions.jsm 218 get
resource://gre/modules/ExtensionPermissions.jsm 266 _get
resource://gre/modules/ExtensionPermissions.jsm 271 _getCached/<
resource://gre/modules/ExtensionParent.jsm 1829 get
resource://gre/modules/addons/XPIProvider.jsm 228 awaitPromise
resource://gre/modules/addons/XPIInstall.jsm 752 syncLoadManifest
resource://gre/modules/addons/XPIDatabase.jsm 2918 updateMetadata
resource://gre/modules/addons/XPIDatabase.jsm 3143 updateExistingAddon
resource://gre/modules/addons/XPIDatabase.jsm 3230 processFileChanges
resource://gre/modules/addons/XPIProvider.jsm 2997 checkForChanges
resource://gre/modules/addons/XPIProvider.jsm 2457 startup
resource://gre/modules/AddonManager.jsm 212 callProvider
resource://gre/modules/AddonManager.jsm 583 _startProvider
resource://gre/modules/AddonManager.jsm 807 startup
resource://gre/modules/AddonManager.jsm 3462 startup
resource://gre/modules/addonManager.js 87 observe
Deprecated.jsm:84
warning resource://gre/modules/Deprecated.jsm:84
FileUtils_getDir resource://gre/modules/FileUtils.jsm:81
_init resource://gre/modules/ExtensionPermissions.jsm:137
lazyInit resource://gre/modules/ExtensionPermissions.jsm:146
get resource://gre/modules/ExtensionPermissions.jsm:218
_get resource://gre/modules/ExtensionPermissions.jsm:266
_getCached resource://gre/modules/ExtensionPermissions.jsm:271
get resource://gre/modules/ExtensionParent.jsm:1829
AsyncFunctionNext self-hosted:684
awaitPromise resource://gre/modules/addons/XPIProvider.jsm:228
syncLoadManifest resource://gre/modules/addons/XPIInstall.jsm:752
updateMetadata resource://gre/modules/addons/XPIDatabase.jsm:2918
updateExistingAddon resource://gre/modules/addons/XPIDatabase.jsm:3143
processFileChanges resource://gre/modules/addons/XPIDatabase.jsm:3230
checkForChanges resource://gre/modules/addons/XPIProvider.jsm:2997
startup resource://gre/modules/addons/XPIProvider.jsm:2457
callProvider resource://gre/modules/AddonManager.jsm:212
_startProvider resource://gre/modules/AddonManager.jsm:583
startup resource://gre/modules/AddonManager.jsm:807
startup resource://gre/modules/AddonManager.jsm:3462
observe resource://gre/modules/addonManager.js:87
Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
|
||
Does rkv support autocreating the directory if it doesn't exist?
If so, then we can remove the true
(=autocreate) parameter at:
If not, is it possible to add support for auto-creating it?
Updated•4 years ago
|
Comment 2•4 years ago
|
||
IIRC, no, it will throw a StoreError::DirectoryDoesNotExistError
.
Comment 3•4 years ago
|
||
(In reply to Victor Porof [:vporof][:vp] from comment #2)
IIRC, no, it will throw a
StoreError::DirectoryDoesNotExistError
.
Are you willing to change the behavior, to allow non-existing directories to be created?
If concerned about creating unwanted directories, possibly by taking the path to the base directory / sub directories as separate parameters by KeyValueService.getOrCreate
.
Updated•4 years ago
|
Comment 4•4 years ago
|
||
Set release status flags based on info from the regressing bug 1637680
Comment 5•4 years ago
|
||
PS. This feature is off by default except on Nightly - see bug 1646182.
Assignee | ||
Comment 6•4 years ago
|
||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 8•4 years ago
|
||
bugherder |
Comment 10•4 years ago
|
||
(In reply to Rob Wu [:robwu] from comment #3)
(In reply to Victor Porof [:vporof][:vp] from comment #2)
IIRC, no, it will throw a
StoreError::DirectoryDoesNotExistError
.Are you willing to change the behavior, to allow non-existing directories to be created?
If concerned about creating unwanted directories, possibly by taking the path to the base directory / sub directories as separate parameters byKeyValueService.getOrCreate
.
Yes that seems reasonable!
What's the motivation behind such a change?
Updated•4 years ago
|
Description
•