Replace OS.File/osfile.jsm with IOUtils/PathUtils in BrowserGlue.jsm
Categories
(Firefox :: General, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox95 | --- | fixed |
People
(Reporter: standard8, Assigned: claubatista, Mentored)
References
Details
(Whiteboard: [lang=js][good-next-bug])
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
Using OS.File
for file access is now obsolete and can be replaced by code using IOUtils. Working towards this,BrowserGlue.jsm
is loaded on startup and accesses OS.File
. Fixing this should help a little towards startup performance.
The code in question can be found here.
There is background information here about how to migrate from OS.File
to IOUtils
.
For OS.Path
, there is PathUtils
available which is more or less a drop-in replacement. The API for PathUtils can be found here.
For OS.Constants.Path.profileDir
this should be replaced by Services.dirsvc.get("ProfD", Ci.nsIFile).path
but please combine instances in one function into an intermediate variable.
If you have questions, please ask.
To run the tests after you've built, you can run the following:
- xpcshell-tests
./mach xpcshell-test browser/components/tests/
. - mochitests:
./mach mochitest browser/components/tests/
- You should also check ESLint before commiting:
./mach xpcshell-test browser/components/tests/
.
I'm happy to mentor this. Note this bug will be auto-assigned when the first patch is attached.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Toolkit::OS.File' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Hey, I'll start to work on this. :)
Assignee | ||
Comment 3•3 years ago
|
||
Updated•3 years ago
|
Comment 5•3 years ago
|
||
bugherder |
Description
•