Closed Bug 204124 Opened 22 years ago Closed 21 years ago

minor codesize optimizations for nsNetUtil.h

Categories

(Core :: Networking, defect, P5)

defect

Tracking

()

VERIFIED FIXED
mozilla1.5alpha

People

(Reporter: darin.moz, Assigned: darin.moz)

References

()

Details

(Keywords: memory-footprint)

Attachments

(1 file)

minor codesize optimizations for nsNetUtil.h

biggest change is to avoid this pattern:

  nsCOMPtr<nsIFoo> foo;
  rv = func(getter_AddRefs(foo));
  if (NS_FAILED(rv)) return rv;

  rv = blah();
  if (NS_FAILED(rv)) return rv;

since each return statement would have code to call the destructor (true at
least with GCC 3.2).  also, the patch i prepared cleans up nsNetUtil.h a bit.
Attached patch v1 patchSplinter Review
Attachment #122247 - Flags: superreview?(alecf)
Attachment #122247 - Flags: review?(dougt)
not on the radar for 1.4
Status: NEW → ASSIGNED
Priority: -- → P5
Target Milestone: --- → mozilla1.5alpha
Comment on attachment 122247 [details] [diff] [review]
v1 patch

this is great stuff.. might be nice to see a -bw patch, but overall this looks
good. 

sr=alecf
Attachment #122247 - Flags: superreview?(alecf) → superreview+
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Attachment #122247 - Flags: review?(dougt)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: