Closed
Bug 826541
Opened 12 years ago
Closed 12 years ago
Suboptimal string copying in nsAttrValue::ToString
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: neil, Assigned: neil)
References
Details
Attachments
(1 file)
3.41 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
(In reply to Boris Zbarsky from bug 760331 comment #8)
> (From update of attachment 665541 [details] [diff] [review])
> > +MiscContainer::Cache()
> > + nsString str;
> You could probaly just use an nsDependentString
Unfortunately nsAttrValue::ToString ends up copying the dependent string to its outparam, whereas with nsAString& it could simply forward the retval.
Assignee | ||
Comment 1•12 years ago
|
||
![]() |
||
Comment 2•12 years ago
|
||
Comment on attachment 697726 [details] [diff] [review]
Proposed patch
r=me. Nice catch.
Attachment #697726 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•