If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

nsLoadGroup::GetName does too many string copies

RESOLVED FIXED

Status

()

Core
Networking
RESOLVED FIXED
16 years ago
16 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

16 years ago
nsLoadGroup::GetName does a lot of string copies when it doesn't need to do any.
 I'll attach a simple patch to fix this.  The only thing it changes is that it
causes the function to propagate the return value from mDefaultLoadRequest
rather than always returning NS_OK.
(Assignee)

Comment 1

16 years ago
Created attachment 51421 [details] [diff] [review]
patch

Comment 2

16 years ago
Comment on attachment 51421 [details] [diff] [review]
patch

r=jag
Attachment #51421 - Flags: review+

Comment 3

16 years ago
Comment on attachment 51421 [details] [diff] [review]
patch

sr=darin
Attachment #51421 - Flags: superreview+

Comment 4

16 years ago
BTW... is this function actually called in optimized builds?  i thought it was
just used for debugging purposes.
(Assignee)

Comment 5

16 years ago
I don't know.  It was just too ugly for me to leave it untouched.  (After all,
people copy code from one place to another, and it could end up copied to
somewhere performance is important...)
(Assignee)

Comment 6

16 years ago
Fix checked in 2001-10-10 18:09 PDT.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED

Comment 7

16 years ago
david: can you mark this verified?
You need to log in before you can comment on or make changes to this bug.