Closed
Bug 1407458
Opened 7 years ago
Closed 7 years ago
Use nsString for Observation filenames
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
Attachments
(1 file, 1 obsolete file)
10.21 KB,
patch
|
erahm
:
review+
|
Details | Diff | Splinter Review |
This avoids some char16_t*/nsString mismatches.
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8917202 -
Flags: review?(erahm)
Comment 2•7 years ago
|
||
Comment on attachment 8917202 [details] [diff] [review] Use nsString for Observation filenames Review of attachment 8917202 [details] [diff] [review]: ----------------------------------------------------------------- Overall looks good. Can you change the commit message? Something like "avoid unnecessary string copies" instead of "mismatches" would be clearer. AFAICT you need to do `PoisonIOInterposerWin` [1] as well. Just return an `nsString&` seems clear to me, but I don't feel too strongly about that. [1] http://searchfox.org/mozilla-central/rev/ed1d5223adcdc07e9a2589ee20f4e5ee91b4df10/xpcom/build/PoisonIOInterposerWin.cpp#198-216 ::: xpcom/build/IOInterposer.h @@ +95,5 @@ > */ > const char* Reference() const { return mReference; } > > + /** Request filename associated with the I/O operation, empty if unknown */ > + virtual void Filename(nsAString& aString) { aString.Truncate(); } It might be cleaner to just return a ref. In this case you could use EmptyString.
Attachment #8917202 -
Flags: review?(erahm) → review-
Assignee | ||
Comment 3•7 years ago
|
||
I added the Windows support. I left the outparam because that's the standard way of returning nsString values.
Attachment #8919684 -
Flags: review?(erahm)
Assignee | ||
Updated•7 years ago
|
Attachment #8917202 -
Attachment is obsolete: true
Comment 4•7 years ago
|
||
(In reply to Nicholas Nethercote [:njn] from comment #3) > Created attachment 8919684 [details] [diff] [review] > Use nsString for Observation filenames > > I added the Windows support. I left the outparam because that's the standard > way of returning nsString values. I'm not convinced that's true, but meh.
Updated•7 years ago
|
Attachment #8919684 -
Flags: review?(erahm) → review+
Assignee | ||
Comment 5•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/380afb457c9a45c977c1cace6263c9284d6bf649 Bug 1407458 - Use nsString for Observation filenames. r=erahm.
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/380afb457c9a
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•