Closed
Bug 361608
Opened 19 years ago
Closed 19 years ago
possible leak in Safari profile migrator
Categories
(Firefox :: Migration, defect)
Tracking
()
RESOLVED
FIXED
Firefox 3 alpha1
People
(Reporter: Gavin, Assigned: asaf)
Details
(Keywords: memory-leak)
Attachments
(1 file, 1 obsolete file)
|
3.96 KB,
patch
|
jay
:
approval1.8.1.2-
|
Details | Diff | Splinter Review |
This is related to bug 344284: if ParseBookmarksFolder fails, we return early without calling ::CFRelease(safariBookmarks). Doesn't this leak safariBookmarks? Should we have helper classes to hold these objects and avoid the manual refcounting (like webkit's RetainPtr)?
Comment 1•19 years ago
|
||
more related to bug #361624.
thanks for spotting this and logging it, gavin.
| Assignee | ||
Updated•19 years ago
|
Assignee: nobody → mano
| Assignee | ||
Comment 2•19 years ago
|
||
Attachment #246568 -
Flags: review?(mark)
Comment 3•19 years ago
|
||
Comment on attachment 246568 [details] [diff] [review]
patch
|return rv| will return an uninitialized value if:
- MOZ_PLACES_BOOKMARKS is not defined
- aReplace is true
- some other failure occurs before reaching ParseBookmarksFolder
I suggest explicit initialization of rv in the !defined(MOZ_PLACES_BOOKMARKS ) code by using the two-argument form of do_GetService both times, adding NS_ENSURE_SUCCESS, and getting rid of NS_ENSURE_TRUE. You can choose an alternate reasonable solution to the problem if you like something else better.
Attachment #246568 -
Flags: review?(mark) → review+
| Assignee | ||
Comment 4•19 years ago
|
||
Attachment #246568 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•19 years ago
|
||
mozilla/browser/components/migration/src/nsSafariProfileMigrator.cpp 1.34
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 alpha1
| Assignee | ||
Updated•19 years ago
|
Attachment #246568 -
Flags: approval1.8.1.2?
| Assignee | ||
Updated•19 years ago
|
Attachment #246568 -
Flags: approval1.8.1.2?
| Assignee | ||
Updated•19 years ago
|
Attachment #246896 -
Flags: approval1.8.1.2?
Comment 6•19 years ago
|
||
Comment on attachment 246896 [details] [diff] [review]
patch
Not critical for 2.0.0.2, maybe next time.
Attachment #246896 -
Flags: approval1.8.1.2? → approval1.8.1.2-
You need to log in
before you can comment on or make changes to this bug.
Description
•