Closed
Bug 1388208
Opened 6 years ago
Closed 6 years ago
Stop using FileUtils.getFile
Categories
(WebExtensions :: General, enhancement)
WebExtensions
General
Tracking
(firefox57 fixed)
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: kmag, Assigned: kmag)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
This performs main thread IO to make sure that directories exist, which is not something we should be doing on the startup path.
Assignee | ||
Updated•6 years ago
|
Blocks: webext-perf
Comment hidden (mozreview-request) |
Comment 2•6 years ago
|
||
Comment on attachment 8894697 [details] Bug 1388208: Stop using FileUtils.getFile. Kris "asked" me to steal the review.
Attachment #8894697 -
Flags: review?(mixedpuppy) → review?(tomica)
Comment 3•6 years ago
|
||
mozreview-review |
Comment on attachment 8894697 [details] Bug 1388208: Stop using FileUtils.getFile. https://reviewboard.mozilla.org/r/165858/#review171174 ::: toolkit/components/extensions/ExtensionParent.jsm:1414 (Diff revision 1) > async _readData() { > let result = new Map(); > try { > let data = await promiseFileContents(this.file); > > result = aomStartup.decodeBlob(data); Now that we switched to `OS.File.read()` which supports compression directly, can we eliminate this dependency on `aomStartup`?
Attachment #8894697 -
Flags: review?(tomica) → review+
Assignee | ||
Comment 4•6 years ago
|
||
mozreview-review-reply |
Comment on attachment 8894697 [details] Bug 1388208: Stop using FileUtils.getFile. https://reviewboard.mozilla.org/r/165858/#review171174 > Now that we switched to `OS.File.read()` which supports compression directly, can we eliminate this dependency on `aomStartup`? This isn't compression. It's structured clone deserialization.
Assignee | ||
Comment 5•6 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/903db0ac80c6a27b61b68e7df699782acc7f8842 Bug 1388208: Stop using FileUtils.getFile. r=zombie
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/903db0ac80c6
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Comment 7•6 years ago
|
||
Would it make sense to add an eslint rule to ban further usage of FileUtils.getFile()?
Comment 8•6 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo please, extremely long backlog, Away 8/18) from comment #7) > Would it make sense to add an eslint rule to ban further usage of > FileUtils.getFile()? We should just migrate the callers and remove the function. Bug 920187 was already on file to do that, but in the meantime I filed bug 1391576 for the low-hanging fruit.
Updated•5 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•