Closed Bug 1733540 Opened 3 years ago Closed 3 years ago

Replace OS.File with IOUtils in XPIInstall.jsm, and drop usage of osfile.jsm

Categories

(Toolkit :: Add-ons Manager, task, P3)

task

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox96 --- wontfix
firefox97 --- fixed

People

(Reporter: standard8, Assigned: mathew.hodson, Mentored)

References

Details

(Whiteboard: [lang=js][good-next-bug])

Attachments

(1 file)

Using OS.File for file access is now obsolete and can be replaced by code using IOUtils. Working towards this,XPIInstall.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. If you have questions, please ask.

To run the tests after you've built, you can run ./mach xpcshell-test toolkit/mozapps/extensions/. You should also check ESLint before commiting: ./mach xpcshell-test toolkit/mozapps/extensions/.

I'm happy to mentor this. Note this bug will be auto-assigned when the first patch is attached.

Changing severity to NA because of it's a task.

Severity: -- → N/A
Priority: -- → P3

Expanding scope slightly to also include dropping osfile.jsm completely. This shouldn't be too much extra work - OS.Path.join can be replaced with PathUtils.join with no need to change the parameters.

Summary: Replace OS.File with IOUtils in XPIInstall.jsm → Replace OS.File with IOUtils in XPIInstall.jsm, and drop usage of osfile.jsm
Assignee: nobody → mathew.hodson
Status: NEW → ASSIGNED
Attachment #9245408 - Attachment description: Bug 1733540 - Replace osfile.jsm with IOUtils in XPIInstall.jsm. r?Standard8 → Bug 1733540 - Replace osfile.jsm with IOUtils/PathUtils in XPIInstall.jsm. r?Standard8

Can you take another look at this? I believe I addressed the requested changes.

Flags: needinfo?(rob)

Thanks.

Flags: needinfo?(rob)

Mathew, thank you for working on this, it is great to get it landing. I've just triggered the landing to autoland.

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0eaa9ccaaf77
Replace osfile.jsm with IOUtils/PathUtils in XPIInstall.jsm. r=robwu
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Regressions: 1736189
Regressions: 1739550
Status: RESOLVED → REOPENED
Flags: needinfo?(mathew.hodson)
Resolution: FIXED → ---
Flags: needinfo?(mathew.hodson)
Target Milestone: 96 Branch → ---

Mathew, do you have access to the try server? I'm tempted to try a few things out on try server and see if we can narrow this issue down a bit.

No I don't have access.

Depends on: 1740301
Blocks: 986145

This doesn't need to block bug 986145 directly, it already blocks bug 1703357 which blocks bug 986145.

No longer blocks: 986145
Attachment #9245408 - Attachment description: Bug 1733540 - Replace osfile.jsm with IOUtils/PathUtils in XPIInstall.jsm. r?Standard8 → Bug 1733540 - Replace osfile.jsm usage in XPIInstall.jsm. r=robwu
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/34e079fbcc76
Replace osfile.jsm usage in XPIInstall.jsm. r=robwu
Status: REOPENED → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Blocks: 1522925
See Also: → 1745427
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: