Closed
Bug 88889
Opened 24 years ago
Closed 24 years ago
The transaction object for undo/redo should hold a weakptr reference to the folder
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: naving, Assigned: naving)
Details
Attachments
(1 file)
|
23.22 KB,
patch
|
Details | Diff | Splinter Review |
| Assignee | ||
Comment 1•24 years ago
|
||
| Assignee | ||
Comment 2•24 years ago
|
||
So the Undo object has a weakptr to the src and dest folders. Also the
imap/local folder no longer holds the transaction manager because it
was causing txnMgr leaks, instead I use the msgWindow object to get
the txnMgr object.
This patch also includes the fix for one of the cases of empty hdrs on
undo in bug 86489. Upon deleting a folder it leaks so we try to
get database when we should not, therefore check if the folder exists on
disk.
Comment 3•24 years ago
|
||
yuck, nsLocalMailFolder shouldn't have a pointer to a msgWindow - what if you
have multiple message windows open?
| Assignee | ||
Comment 4•24 years ago
|
||
That is nsLocalMailCopyState that I have msgWindow to. The nsLocalMailCopyState
class definition is in nsLocalMailFolder.cpp
| Assignee | ||
Comment 5•24 years ago
|
||
Ignore these changes in nsImapMailFolder. They are not needed.
+ PRBool exists;
+ rv = pathSpec->Exists(&exists);
+ NS_ENSURE_SUCCESS(rv,rv);
+ if (!exists) return NS_ERROR_NULL_POINTER; //mDatabase will be null at
this point.
Comment 6•24 years ago
|
||
I know that this was messed up before you got here...but
the problem is not what source file it's defined in; it's what object holds onto
one. If an nsLocalMailFolder holds onto an nsIMsgWindow, then you're tying that
folder to just one window, and you're also introducing a great opportunity for
circular references. And I'm worried that people will start using that msgWindow
for other stuff, and it will break the whole model/view distinction that we
should be having. The copy state should belong to the url that's doing the copy.
Plus, unless I'm missing something, the nsLocalMailFolder::m_msgWindow never
gets set to anything.
Comment 7•24 years ago
|
||
could you make this an nsXPIDLCString while you're at it:
char *uri = nsnull;
- rv = m_srcFolder->GetURI(&uri);
+ rv = srcFolder->GetURI(&uri);
and remove the PR_FREEIF?
otherwise, looks good, r=bienvenu
| Assignee | ||
Comment 8•24 years ago
|
||
marking fixed. fix checked in last week
| Assignee | ||
Comment 9•24 years ago
|
||
fixed.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
OS: Windows NT → All
QA Contact: esther → stephend
Hardware: PC → All
Verified FIXED using lxr.mozilla.org:
nsImapMailFolder.cpp 1.413
nsImapMailFolder.h 1.167
nsImapUndoTxn.cpp 1.30
nsImapUndoTxn.h 1.14
nsLocalMailFolder.cpp 1.300
nsLocalMailFolder.h 1.109
nsLocalUndoTxn.cpp 1.24
nsLocalUndoTxn.h 1.9
Status: RESOLVED → VERIFIED
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•