Closed
Bug 156733
Opened 22 years ago
Closed 21 years ago
nsDirectoryService needs to rid its reliance on nsSpecialSystemDirectory
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
INVALID
People
(Reporter: ccarlen, Assigned: ccarlen)
Details
Attachments
(1 file)
60.91 KB,
patch
|
sdagley
:
review+
alecf
:
superreview+
|
Details | Diff | Splinter Review |
nsSpecialSystemDirectory is based on nsFileSpec, which in itself is evil, but is especially a problem for XP_MACOSX builds. In that world, the XP_UNIX version of nsFileSpec is used because it uses '/' delimited POSIX paths which we want. But, the nature of the nsFileSpec is very different between XP_MAC and XP_UNIX. nsSpecialSystemDirectory, under XP_MACOSX, is caught in an odd place in between. What I want to do is eliminate the use of nsSpecialSystemDirectory and then this can be cleaned up properly.
Assignee | ||
Comment 1•22 years ago
|
||
Fixing summary.
Status: NEW → ASSIGNED
Summary: nsDirectoryService needs to rid of reliance on nsSpecialSystemDirectory → nsDirectoryService needs to rid its reliance on nsSpecialSystemDirectory
Assignee | ||
Comment 2•22 years ago
|
||
This should be done first. It removes all consumers of nsSpecialSystemDirectory (outside xpcom) from the tree and no longer exports the file.
Comment 3•22 years ago
|
||
Comment on attachment 97338 [details] [diff] [review] phase #1 patch r=sdagley w/a few comments: 1) Nice to see how many times nsSpecialSystemDirectory.h was gratuitously included :-) 2) whitespace seems off on several files 3) In DataStruct::GetFileSpec() there's a comment that implies aFileName may be NULL but the new code is testing aFileName.IsEmpty() which isn't the same and may not be safe.
Attachment #97338 -
Flags: review+
Assignee | ||
Comment 4•22 years ago
|
||
> In DataStruct::GetFileSpec() there's a comment that implies aFileName may be
NULL but the new code is testing aFileName.IsEmpty
that's because the old "aFileName" was a const char*. Now it's a const
nsACString&. The comment could be changed to say "empty" instead of "NULL."
Assignee | ||
Comment 5•22 years ago
|
||
cc'ing Alec for sr=. BTW, phase #1 is to get rid of all consumers of this object and limit its use to the internals of directory service. Once that is done, the next phase is refactoring the code so that it's not nsFileSpec-based but is nsILocalFile-based (either as a class with a GetFile() method or an nsIDirectoryServiceProvider impl which is created and registered by directory service when it is created).
Comment 6•22 years ago
|
||
Comment on attachment 97338 [details] [diff] [review] phase #1 patch sr=alecf wow, mail uses way too many temp files!
Attachment #97338 -
Flags: superreview+
Assignee | ||
Comment 7•21 years ago
|
||
Minimo landing did this.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•