Closed Bug 438335 Opened 16 years ago Closed 16 years ago

CopyRequest not cleared when local folder is moved

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9

People

(Reporter: rain1, Assigned: rain1)

References

Details

Attachments

(1 file, 3 obsolete files)

Attached patch patch (obsolete) — Splinter Review
When a local folder is moved, a CopyRequest is created but not immediately cleared. This also means that the OnStopCopy event doesn't happen for this. (The CopyRequest clears only at shutdown, when the objects are being destroyed.)

This patch should fix this.

Notes:
- the patch won't work on trunk, the one for bug 437848 needs to get in first, there's a changed variable name
- Is this the correct place to call OnCopyCompleted()?
- the nsISupports QI is needed as the FindRequest function compares nsISupports addresses
- the nsIMsgFolderListener notification is now sent from ClearRequest()
- there's a unit test coming up for this and for nsIMsgFolderListeners for local folders
Attachment #324450 - Flags: superreview?(bienvenu)
Attachment #324450 - Flags: review?(bienvenu)
Blocks: 430614
Status: NEW → ASSIGNED
s/there's a changed variable name/there's a new variable/ , whoops
I'm going to have to check this out myself - I've applied the other patch (I'd check it in, but the tree seems closed) and now I'll apply this patch.
for copying local folders, the nsIMsgFolderListener notification is sent from here:

http://mxr.mozilla.org/mozilla/source/mailnews/local/src/nsLocalMailFolder.cpp#2010

unless I'm missing something. I'll look into the copy request stuff this afternoon.
David -- er, yes, that's exactly what I removed in the patch as it was resulting in duplicate notifications (once from there, once in OnStopCopy()).

Hmm, the change breaks notifications for deleting a folder to the trash:
http://mxr.mozilla.org/mozilla/source/mailnews/local/src/nsLocalMailFolder.cpp#1001

IMHO we should use the copy service for this too, for consistency.
Just tested with the copy service, and it works correctly, giving the itemMoveCopyCompleted notification. However we don't have a copy listener object to pass in to the copy service, thus we can't get an OnStopCopy notification. Should this object be passed in as an extra parameter, like msgWindow?
Attached patch sorry, wrong patch (obsolete) — Splinter Review
Attachment #324450 - Attachment is obsolete: true
Attachment #324664 - Flags: superreview?(bienvenu)
Attachment #324664 - Flags: review?(bienvenu)
Attachment #324450 - Flags: superreview?(bienvenu)
Attachment #324450 - Flags: review?(bienvenu)
Comment on attachment 324664 [details] [diff] [review]
sorry, wrong patch

wrong patch, sorry
Attachment #324664 - Attachment description: update, with delete to trash using the copy service → sorry, wrong patch
Attachment #324664 - Attachment is obsolete: true
Attachment #324665 - Flags: superreview?(bienvenu)
Attachment #324665 - Flags: review?(bienvenu)
Attachment #324664 - Flags: superreview?(bienvenu)
Attachment #324664 - Flags: review?(bienvenu)
Sorry for all the messing up above, I didn't realise I had the wrong hg patch loaded when I was making those changes :(
Attachment #324665 - Attachment is obsolete: true
Attachment #324667 - Flags: superreview?(bienvenu)
Attachment #324667 - Flags: review?(bienvenu)
Attachment #324665 - Flags: superreview?(bienvenu)
Attachment #324665 - Flags: review?(bienvenu)
Attachment #324667 - Flags: superreview?(bienvenu)
Attachment #324667 - Flags: superreview+
Attachment #324667 - Flags: review?(bienvenu)
Attachment #324667 - Flags: review+
Keywords: checkin-needed
Checking in mailnews/base/src/nsMsgCopyService.cpp;
/cvsroot/mozilla/mailnews/base/src/nsMsgCopyService.cpp,v  <--  nsMsgCopyService.cpp
new revision: 1.62; previous revision: 1.61
done
Checking in mailnews/local/src/nsLocalMailFolder.cpp;
/cvsroot/mozilla/mailnews/local/src/nsLocalMailFolder.cpp,v  <--  nsLocalMailFolder.cpp
new revision: 1.587; previous revision: 1.586
done
Keywords: checkin-needed
Target Milestone: --- → mozilla1.9
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Covered by the test in attachment 326455 [details] [diff] [review] in bug 436880.
Flags: in-testsuite+
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: