Closed
Bug 255710
Opened 20 years ago
Closed 20 years ago
nsDocShell::GetDocShellEnumerator leaks docShellEnum in failure cases
Categories
(Core :: DOM: Navigation, defect)
Core
DOM: Navigation
Tracking
()
RESOLVED
FIXED
mozilla1.8alpha4
People
(Reporter: timeless, Assigned: csthomas)
References
()
Details
(Keywords: memory-leak)
Attachments
(1 file, 1 obsolete file)
2.25 KB,
patch
|
timeless
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
a do {} while (0) loop could be used, otherwise something will have to manage that pointer...
Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.8alpha4
Assignee | ||
Comment 1•20 years ago
|
||
Assignee | ||
Updated•20 years ago
|
Attachment #156218 -
Flags: superreview?(jst)
Attachment #156218 -
Flags: review?(darin)
Comment 2•20 years ago
|
||
Comment on attachment 156218 [details] [diff] [review] patch v1 >Index: nsDocShell.cpp > nsDocShellEnumerator* docShellEnum; > if (aDirection == ENUMERATE_FORWARDS) > docShellEnum = new nsDocShellForwardsEnumerator; > else > docShellEnum = new nsDocShellBackwardsEnumerator; > > if (!docShellEnum) return NS_ERROR_OUT_OF_MEMORY; > >+ nsCOMPtr<nsISupports> docShellEnumPtr(docShellEnum); you could also just change the declaration of docShellEnum to: nsRefPtr<nsDocShellEnumerator> docShellEnum; nsRefPtr is just like nsCOMPtr except that it can be used with concrete class pointers.
Assignee | ||
Comment 3•20 years ago
|
||
Attachment #156218 -
Attachment is obsolete: true
Assignee | ||
Updated•20 years ago
|
Attachment #156218 -
Flags: superreview?(jst)
Attachment #156218 -
Flags: review?(darin)
Assignee | ||
Updated•20 years ago
|
Attachment #156307 -
Flags: superreview?(jst)
Attachment #156307 -
Flags: review?(darin)
Comment 4•20 years ago
|
||
Comment on attachment 156307 [details] [diff] [review] Patch v2 sr=jst
Attachment #156307 -
Flags: superreview?(jst) → superreview+
Attachment #156307 -
Flags: review?(darin) → review+
Assignee | ||
Comment 5•20 years ago
|
||
Timeless checked in the patch.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•