Closed
Bug 98213
Opened 23 years ago
Closed 23 years ago
Make data members of nsStr protected and clean up code
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla0.9.7
People
(Reporter: jag+mozilla, Assigned: jag+mozilla)
References
Details
Attachments
(1 file, 4 obsolete files)
14.94 KB,
patch
|
dbaron
:
review+
alecf
:
superreview+
|
Details | Diff | Splinter Review |
More code cleanup.
Assignee | ||
Comment 2•23 years ago
|
||
Is the comment in nsDirectoryViewer.cpp no longer true? If so, take it out. If
not, could you find a way to do what the original code did?
Assignee | ||
Updated•23 years ago
|
Attachment #48189 -
Attachment is obsolete: true
Assignee | ||
Comment 4•23 years ago
|
||
Attachment #48687 -
Flags: review+
Could you explain why the SetLength calls still do what the old code did even
though SetLength does stuff other than set mLength?
Assignee | ||
Comment 6•23 years ago
|
||
Sure. SetLength will grow the string if you're setting it to a length greater
than its current capacity. In this case it's a no-op since the code already did
that directly through SetCapacity a few lines up.
Comment 7•23 years ago
|
||
Mass-moving lower-priority 0.9.5 bugs off to 0.9.6 to make way for remaining
0.9.4/eMojo bugs, and MachV planning, performance and feature work. If you
disagree with any of these targets, please let me know.
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Comment 9•23 years ago
|
||
I've got similar work over in bug 108962.. jag and I discussed that he would try
to get the best of both worlds landed for this bug first, then I would submit
new patches for that bug.
Blocks: 108962
Comment 10•23 years ago
|
||
Comment on attachment 48687 [details] [diff] [review]
Updated per dbaron's comment
that said, sr=alecf
Attachment #48687 -
Flags: superreview+
Assignee | ||
Comment 11•23 years ago
|
||
Is there a better solution for the MathML change?
I prefer Truncate(0) (or Truncate()) over SetLength(0), etc (when it is a
truncation).
What's the ToNewUTF8String doing there?
Assignee | ||
Comment 13•23 years ago
|
||
I could remove the Operator constructor since no one uses it ;-)
Other than that, I could maybe convert this to use nsDependentString, let me
look at that if you think it's really an issue.
SetLength(0) fixed, and removed the explicit 0 terminations right above them
(and other SetLength calls in the same file) since SetLength takes care of that.
ToNewUTF8String pulls some tricks to avoid an extra copy if the
NS_ConvertUCS2toUTF8 allocated memory to do the conversion:
http://lxr.mozilla.org/seamonkey/source/string/src/nsReadableUtils.cpp#214
Assignee | ||
Comment 14•23 years ago
|
||
alecf, sorry about not having it in yet.
Assignee | ||
Comment 15•23 years ago
|
||
Attachment #48687 -
Attachment is obsolete: true
Attachment #57453 -
Attachment is obsolete: true
Attachment #57464 -
Attachment is obsolete: true
Comment 16•23 years ago
|
||
Comment on attachment 57573 [details] [diff] [review]
Above + removing the unused constructor of OperatorData.
so awesome. sr=alecf
Oh well, I was out of town for the sr= anyway :)
Attachment #57573 -
Flags: superreview+
Comment on attachment 57573 [details] [diff] [review]
Above + removing the unused constructor of OperatorData.
r=dbaron
Attachment #57573 -
Flags: review+
Assignee | ||
Comment 18•23 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•