Closed
Bug 714132
Opened 13 years ago
Closed 13 years ago
Possible double release of a NSColor
Categories
(Core :: Widget: Cocoa, defect)
Tracking
()
RESOLVED
FIXED
mozilla12
People
(Reporter: hub, Assigned: hub)
Details
(Whiteboard: [inbound])
Attachments
(1 file)
1.20 KB,
patch
|
smichaud
:
review+
smichaud
:
checkin+
|
Details | Diff | Splinter Review |
in nsCocoaWindow.mm around line 2318 in the method -[ToolbarWindow initWithContentRect:...], we do mBackgroundColor = [NSColor whiteColor]. but in the dealloc, we do [mBackgroundColor release] which leads so do we in -[ToolbarWindow setBackgroundColor:]. [NSColor whiteColor] returns an "autoreleased", therefor we should retain it. The fact that it does not crash is surprising, albeit maybe not as it is entirely possible that the framework returns a static instance. But this is implementation dependent. Will attach a patch.
Assignee | ||
Comment 1•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #584805 -
Flags: review?(smichaud)
Comment 2•13 years ago
|
||
Comment on attachment 584805 [details] [diff] [review] [NSColor whiteColor] must be retained in ToolbarWindow. r= I also don't know why we don't crash, but this is the right thing to do.
Attachment #584805 -
Flags: review?(smichaud) → review+
Assignee | ||
Updated•13 years ago
|
Attachment #584805 -
Flags: checkin?(smichaud)
Comment 3•13 years ago
|
||
Comment on attachment 584805 [details] [diff] [review] [NSColor whiteColor] must be retained in ToolbarWindow. r= Landed on mozilla-inbound: http://hg.mozilla.org/integration/mozilla-inbound/rev/0022f8be9fea
Attachment #584805 -
Flags: checkin?(smichaud) → checkin+
Updated•13 years ago
|
Whiteboard: [inbound]
Updated•13 years ago
|
Assignee: nobody → hub
Comment 4•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/0022f8be9fea
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in
before you can comment on or make changes to this bug.
Description
•