Closed Bug 225203 Opened 22 years ago Closed 22 years ago

Weird AddRef/Release pair if AddCookieToList fails

Categories

(Core :: Networking: Cookies, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: caillon, Assigned: caillon)

Details

Attachments

(1 file)

After an IRC conversation with dwitte, we decided to move the addref after the failure check so as to save an addref/release pair in the failure case. The one caller which passed in a 0-refcounted object needs to be updated to manually delete its object, which is more explicit about its failure measures. Having a method "magically" delete your objects on failure is a bit odd :)
Comment on attachment 135167 [details] [diff] [review] Patch ace in the hole!
Attachment #135167 - Flags: review?(dwitte) → review+
Attachment #135167 - Flags: superreview?(jst)
Comment on attachment 135167 [details] [diff] [review] Patch Heh, ok :-) sr=jst
Attachment #135167 - Flags: superreview?(jst) → superreview+
Checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: