On IMAP folders, the user-facing concept of "compact" also implies an expunge.
This patch ensures that the expunge operation completes before the compact is started.
This means that expunged messages will be compacted immediately rather than being missed and left for the next compaction.
It also makes sure that any provided listener is properly informed when operation as a whole is finished (or has failed).
Differential Revision: https://phabricator.services.mozilla.com/D153827
--HG--
extra : amend_source : 6f3e249856103c288fd8696f0088ec7b866414ad
- Adds nsIMsgPluggableStore.supportsCompaction checks to folder compact() and compactAll() implementations.
- Adds a last-ditch sanity check to nsMsgFolderCompactor to ensure it's not trying to compact folders which don't support compaction.
- Remove unused nsIMsgPluggableStore.compactFolder() implementation for now to reduce confusion (The compaction _should_ eventually be handled by the msgStore, but we're not there yet).
Differential Revision: https://phabricator.services.mozilla.com/D151198
--HG--
extra : rebase_source : c78b8efd8b9b76b30da415c280082a613d1b0f8f
Moves the import of the modules into the lazy factory, and tests that they aren't loaded during a simple start-up that doesn't need them.
The POP3 service still gets started (by pop3Download.jsm) but I will look at that later.
Differential Revision: https://phabricator.services.mozilla.com/D152240
--HG--
extra : rebase_source : 598184bdf20a0e5603168993b9c519acba065351
extra : intermediate-source : 11ff05591d2e397700dad543fcc57bd4f555ead9
extra : source : 254297180e5b8e58ed80a861737cc36bc46ba378
Changed prettier printWidth to 100 to put Services.jsm on one line, prettified and then
grep -rEl "/Services.jsm" --exclude-dir=.hg --exclude-dir=suite --include="*.js" --include="*.jsm" --exclude=".*" . | xargs xargs sed -i -e '/\/Services.jsm/d'
Differential Revision: https://phabricator.services.mozilla.com/D151575
--HG--
extra : rebase_source : 43da2706d3b30f5062511cedd527e9fb65631f02
extra : amend_source : 863bfd4ad3930f4fe4ed0b3dba6061370118f9a5
Backs out part 0 (revision 0b2e593b3fe8) and registers nsSyncStreamListener using components.conf
Differential Revision: https://phabricator.services.mozilla.com/D150998
--HG--
extra : rebase_source : 726aa9b79ddd1a4c36e2284bbb0b19bfb4b59c4b
extra : histedit_source : d60e11c52178b0669844b351225a74c5d66595dc
We don't need to keep using this and it's getting in the way, so rather than figure out how to deal with it, I'm going to remove it.
Differential Revision: https://phabricator.services.mozilla.com/D150669
--HG--
extra : rebase_source : e2c1af6c1b98d3baea0906815564eb00bcfeaf6c
extra : histedit_source : 603ef35f5dd1340a38198d9c24b53fade9dcb189%2C69e9f7ee559d6292f2a4e902ad56455a640fbe86
Helps to avoid account lock-out when`user's password has expired and multiple connections
attempting to authenticate with a bad password.
Differential Revision: https://phabricator.services.mozilla.com/D149812
--HG--
extra : moz-landing-system : lando
nsImapMailFolder::CopyMessagesOffline() was calling GetMsgInputStream() for
for non-offline messages, even if the message wasn't marked offline.
This patch also:
- moves a few local vars closer to where they are used
- tightens error checking and recovery
Differential Revision: https://phabricator.services.mozilla.com/D149841
--HG--
extra : moz-landing-system : lando
A little ugly, but hopefully not too intrusive.
Fixes the case for IMAP/News folders where offline message writes were
leaving .offlineMessageSize unset when destination stream is non-seekable.
This is already the case when quarantining is enabled (i.e. when
mailnews.downloadToTempFile is true), and will eventually be the case for
most nsIMsgPluggableStream-provided output streams.
Differential Revision: https://phabricator.services.mozilla.com/D149488
--HG--
extra : rebase_source : 57d19846206645c5ee64c87c743d1c22f4f770b3
Also make MailServices.jsm non lazy.
Internally its using lazy and is loaded early.
Differential Revision: https://phabricator.services.mozilla.com/D149388
--HG--
extra : rebase_source : 41f030ad3b10f0eccb7a3b41a36421d9a892b606
Also implement possibleImapMailbox and discoveryDone of nsIImapServerSink, which are used to create new folders and remove folders not found on server.
Differential Revision: https://phabricator.services.mozilla.com/D146771
--HG--
extra : rebase_source : a7742a57559ef273832c154ce570532e2632e9b0
Delete messages not found on server.
Depends on D145825.
Differential Revision: https://phabricator.services.mozilla.com/D145826
--HG--
extra : rebase_source : 26a62fafae96bf70188f1a0c15576b6e80c80eb6
Because a single response can span multiple chunks, and can contain multiple types of data.
Differential Revision: https://phabricator.services.mozilla.com/D145825
--HG--
extra : rebase_source : 9a4b200fdd51c35687e384ac4f1916fa8e04189a
NOOP can return more than flags changes, will handle them in later patches.
Depends on D145412.
Differential Revision: https://phabricator.services.mozilla.com/D145413
--HG--
extra : moz-landing-system : lando
Rename _idleConnections to _freeConnections to avoid confusion with the IDLE command.
This patch only adds code to send IDLE/NOOP, follow-up patches will actually handle IDLE/NOOP responses.
Differential Revision: https://phabricator.services.mozilla.com/D145412
--HG--
extra : moz-landing-system : lando
Load msg in messagepane works as well.
Depends on D144253.
Differential Revision: https://phabricator.services.mozilla.com/D144254
--HG--
extra : amend_source : 4618d96542b6f4ba7e523d3efabe2be76549e2aa
New messages should show up in the threadPane. Select a message to show in messagePane doesn't work yet.
Depends on D143965.
Differential Revision: https://phabricator.services.mozilla.com/D143967
--HG--
extra : amend_source : 74c83c8ce0d39db0223a815159d8a89f7c4cf912
Functions are added in ImapClient to send UID FETCH request, only to test ImapResponse.
Differential Revision: https://phabricator.services.mozilla.com/D143565
--HG--
extra : amend_source : 0c2a0ed588f24f628a8a81c487eb263ed944d5a1
In nsIMsgFolder.compactAll(), the aCompactOfflineAlso param was always true
for IMAP folders, and always false for local folders. The calling code
shouldn't have to deal with that check.
Differential Revision: https://phabricator.services.mozilla.com/D139352
Depends on D139327
As well as splitting up the manifests I've made "run-sequentially" apply to all of the tests, and added tags to each of the manifests so you can choose to run one version of the tests with the --tag argument.
Differential Revision: https://phabricator.services.mozilla.com/D137006
--HG--
extra : moz-landing-system : lando
- Add central definition for max size (kMaxEntries).
- Ensure a free slot before adding new entry (rather than going oversize then trimming back).
- Embed nsTArray<> rather than separate heap alloc.
- Reduce work done during dtor and clear.
- Ditch static Create() function and make ctor public.
- Remove returncodes for fns which don't really need them.
Differential Revision: https://phabricator.services.mozilla.com/D135298
--HG--
extra : moz-landing-system : lando
Additionally, this changes nsImapBodyShell to no longer retain nsImapProtocol
as a member variable. nsImapBodyShells are cached, so it seems irresponsible
for them to hold a raw pointer to the connection. Instead, the connection is
passed in as an extra parameter to nsImapBodyShell::Generate().
There's also a little light tidying and cruft removal.
Differential Revision: https://phabricator.services.mozilla.com/D135191
--HG--
extra : amend_source : 0e95356cc328b2073e3e2a61d7e373084bf6138f
CID 1260186 Unused value
An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In RecursiveCopy(nsIFile *, nsIFile *): A value assigned to a variable is never used.
Differential Revision: https://phabricator.services.mozilla.com/D133413
--HG--
extra : rebase_source : 7cb148e645af9a85b37a75f12eeb6d24d1e12224
CID 1260155 Unused value
An assigned value that is never used may represent unnecessary computation, an incorrect algorithm, or possibly the need for cleanup or refactoring.
In nsImapMailFolder::SyncFlags(nsIImapFlagAndUidState *): A value assigned to a variable is never used
Differential Revision: https://phabricator.services.mozilla.com/D133412
--HG--
extra : rebase_source : 40cc185a522eed25273e87a9390adffa5b954bb3
extra : amend_source : 7ba386d21e31290a989360c601b88ef51f5921a9
`nsImapProtocol::Run` has a race condition between main thread and IMAP thread.
IMAP thread is running `Runnable` by nsImapProtocol. But it is possible to run
`releaseOnMain` for `nsIImapProtocol` before decrementing reference count of
`Runnable` by `nsImapProtocol` on IMAP thread. So then, the destructor of
`nsImapProtocol` may run on IMAP thread that is shutting down.
In other words, this sequence is the following.
1. `nsImapProtocol::Run()` calls `NS_ReleaseOnMainThread` to dereference
`nsImapProtocol` on Imap thread.
2. `nsImapProtocol` is released in main thread since we used
`NS_ReleaseOnMainThread`.
3. `nsThread::ProcessNextEvent` releases `nsImapProtocol` on Imap thread since
`nsIRunnble` is done and `nsImapProtocol` inherits `nsIRunnable`.
4. `nsImapProtocol`'s reference is nothing, then it is deleted on Imap thread.
So `nsImapProtocol` shouldn't inherit `nsIRunnable`.
Differential Revision: https://phabricator.services.mozilla.com/D132920
--HG--
extra : moz-landing-system : lando
- in ~nsMsgCompose, remove tmp attachments only if mMsgSend is not inited
- remove tmp attachments after mMsgSend->CreateAndSendMessage returns
- add tests for forwarding messages in filters
Differential Revision: https://phabricator.services.mozilla.com/D132668