Clean up IOUtils
Categories
(Toolkit Graveyard :: OS.File, task)
Tracking
(firefox84 fixed)
| Tracking | Status | |
|---|---|---|
| firefox84 | --- | fixed |
People
(Reporter: beth, Assigned: beth)
References
Details
Attachments
(14 files)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
There are a few minor cleanups to be done on the IOUtils code.
| Assignee | ||
Comment 1•5 years ago
|
||
This utility is not used and can be removed.
Depends on D95254
| Assignee | ||
Comment 2•5 years ago
|
||
As part of cleaning up IOUtils, we can construct nsLocalFiles in
IOUtils::Read{,UTF8}, which has the benefit of doing more checks up front,
instead of waiting until we have passed work off to the background thread.
Once all methods pass nsIFile instances through to the background thread,
we can remove our own absolute path checking code.
Depends on D96134
| Assignee | ||
Comment 3•5 years ago
|
||
Some other clean ups have been made, like using nsIFile::Exists() instead of
opening a file to see if it exists.
Depends on D96135
| Assignee | ||
Comment 4•5 years ago
|
||
Depends on D96136
| Assignee | ||
Comment 5•5 years ago
|
||
We no longer normalize the paths in CopyOrMoveSync and instead rely on
nsIFile::{Copy,Move}ToFollowingLinks to provide path normalization.
Depends on D96137
| Assignee | ||
Comment 6•5 years ago
|
||
Depends on D96138
| Assignee | ||
Comment 7•5 years ago
|
||
CreateDirectorySync has also been renamed to MakeDirectorySync to mirror
all other Fn vs FnSync methods in IOUtils.
Depends on D96139
| Assignee | ||
Comment 8•5 years ago
|
||
Depends on D96140
| Assignee | ||
Comment 9•5 years ago
|
||
Depends on D96141
| Assignee | ||
Comment 10•5 years ago
|
||
Depends on D96142
| Assignee | ||
Comment 11•5 years ago
|
||
nsFileInputStream does most of the same work we were doing manually to read
files and determine their size in ReadSync.
Depends on D96143
| Assignee | ||
Comment 12•5 years ago
|
||
Depends on D96144
| Assignee | ||
Comment 13•5 years ago
|
||
The nsFileOutputStream does all the error checking we were doing in WriteSync,
which we can now remove. PR_CloseDelete and all usages of raw PR file
descriptors can be also now be removed.
Additionally, the mode we were using for writing included PR_WRONLY | PR_TRUNCATE | PR_APPEND, which makes the PR_APPEND redundant.
Depends on D96145
| Assignee | ||
Comment 14•5 years ago
|
||
Depends on D96146
Comment 15•5 years ago
|
||
Comment 16•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/35729964b449
https://hg.mozilla.org/mozilla-central/rev/6f67e1fdbb34
https://hg.mozilla.org/mozilla-central/rev/6ca8089d00e3
https://hg.mozilla.org/mozilla-central/rev/c03cb8e8d84a
https://hg.mozilla.org/mozilla-central/rev/9ce96274cd43
https://hg.mozilla.org/mozilla-central/rev/b8dd57b72a05
https://hg.mozilla.org/mozilla-central/rev/14a6de7d3adf
https://hg.mozilla.org/mozilla-central/rev/caf75fed0764
https://hg.mozilla.org/mozilla-central/rev/be537370928e
https://hg.mozilla.org/mozilla-central/rev/98e31bd40f8e
https://hg.mozilla.org/mozilla-central/rev/7eb3ffe23c14
https://hg.mozilla.org/mozilla-central/rev/8f76a3bc1006
https://hg.mozilla.org/mozilla-central/rev/e63cb11a9669
https://hg.mozilla.org/mozilla-central/rev/8d8eeffbcdea
Updated•2 years ago
|
Description
•