Closed
Bug 1445892
Opened 7 years ago
Closed 7 years ago
Remove nsGkAtoms::Home atom
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
References
Details
Attachments
(2 files)
4.29 KB,
patch
|
Details | Diff | Splinter Review | |
59 bytes,
text/x-review-board-request
|
froydnj
:
review+
|
Details |
nsGkAtoms::Home and DirectoryAtoms::Home are duplicate static atoms. Of the
two, the former seems easier remove, simply by replacing its two uses with
appropriate NS_GetStaticAtom() calls. Those calls should be rare, because they
only occur when pressing the "Home" key on Windows or Linux.
MozReview-Commit-ID: H6PZFNPp6nl
![]() |
Assignee | |
Comment 1•7 years ago
|
||
Attachment #8959079 -
Flags: review?(nfroyd)
![]() |
||
Comment 2•7 years ago
|
||
Comment on attachment 8959079 [details] [diff] [review]
Remove nsGkAtoms::Home atom
Review of attachment 8959079 [details] [diff] [review]:
-----------------------------------------------------------------
Why not move this into some common list like nsGkAtoms? I mean, if we're going to have this central list in XPCOM, we might as well use the central list, no?
Attachment #8959079 -
Flags: review?(nfroyd)
![]() |
Assignee | |
Comment 3•7 years ago
|
||
> Why not move this into some common list like nsGkAtoms? I mean, if we're
> going to have this central list in XPCOM, we might as well use the central
> list, no?
I originally tried that, but there's the weirdness of the directory "Home" atom being defined like this:
https://searchfox.org/mozilla-central/rev/877c99c523a054419ec964d4dfb3f0cadac9d497/xpcom/io/nsDirectoryServiceAtomList.h#14
Its name is "sOS_HomeDirectory" and its value is NS_OS_HOME_DIR. All the other directories are defined via constants, I thought it would be weird to have this one directory handled differently. Especially at usage points like this:
https://searchfox.org/mozilla-central/rev/877c99c523a054419ec964d4dfb3f0cadac9d497/xpcom/io/nsDirectoryService.cpp#601
It seems odd to have nsGkAtoms::Home in among that code.
If you still feel strongly about it, I can do it that way.
Comment hidden (mozreview-request) |
![]() |
Assignee | |
Comment 5•7 years ago
|
||
froydnj: I put up a patch that goes in the other direction. I like the first patch better, but I'm happy to defer to your preference.
![]() |
||
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8960809 [details]
Bug 1445892 - Remove nsDirectoryService::sOS_HomeDirectory atom.
https://reviewboard.mozilla.org/r/229540/#review235650
Thanks.
Attachment #8960809 -
Flags: review?(nfroyd) → review+
![]() |
Assignee | |
Comment 7•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/065e8188dc9007ff2e68b00906cc972133a17a43
Bug 1445892 - Remove nsDirectoryService::sOS_HomeDirectory atom. r=froydnj
Comment 8•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in
before you can comment on or make changes to this bug.
Description
•