Closed Bug 826541 Opened 9 years ago Closed 9 years ago
Suboptimal string copying in ns
Attr Value::To String
(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: nobody → neil
Status: NEW → ASSIGNED
Attachment #697726 - Flags: review?(bzbarsky)
Comment on attachment 697726 [details] [diff] [review] Proposed patch r=me. Nice catch.
Attachment #697726 - Flags: review?(bzbarsky) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
You need to log in before you can comment on or make changes to this bug.