Граф коммитов

1502 Коммитов

Автор SHA1 Сообщение Дата
Ping Chen b79688bd34 Bug 1762688 - Implement fetchCustomMsgAttribute in ImapService.jsm. r=mkmelin
Enable test_fetchCustomAttribute.js.

Differential Revision: https://phabricator.services.mozilla.com/D153887
2022-08-06 06:57:55 +00:00
Ben Campbell 2f84e25965 Bug 1692919 - Tidy away some leftover nsIMutableArray cruft. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D153946
2022-08-09 11:18:16 +00:00
Magnus Melin b71050ef75 Bug 1783659 - Backed out changeset 173576a762db (bug 1629669) for lockups. rs=backout DONTBUILD
--HG--
extra : amend_source : 9829ddd294e4c07e28dfe7c1d72e1833be83a625
2022-08-09 11:52:06 +10:00
Magnus Melin 12f05b98b2 Bug 1629669 - Fix Thunderbird Crash in [@ shutdownhang | nsThread::Shutdown | nsThreadManager::Shutdown] - might be stuck waiting for password on shutdown. r=benc
Differential Revision: https://phabricator.services.mozilla.com/D153322

--HG--
extra : rebase_source : a2cc1631ca884a63531445f8ca555387c3a943ec
2022-08-08 11:55:24 +10:00
Ben Campbell 5d563d11db Bug 1782374 - Add UrlListener to serialise IMAP folder expunge and compact operations. r=mkmelin
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
2022-08-05 20:44:32 +10:00
Ben Campbell d2f1a110f1 Bug 1683714 - Don't run folder compaction on folders which don't support it. r=mkmelin
- 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
2022-08-02 20:34:33 +10:00
Ben Campbell 08f79ea753 Bug 1782347 - Fix nsString-related bustage from bug 1772006. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D153306

--HG--
extra : amend_source : a50a30575bab2fa4edcdadcabbead9236f2904dc
2022-07-31 20:43:42 +10:00
Ping Chen 3d8384f4a8 Bug 1762688 - Implement updateFolderStatus and GetNewMessagesForNonInboxFolders in imap-js. r=mkmelin
Enable test_dontStatNoSelect.js.

Differential Revision: https://phabricator.services.mozilla.com/D153301

--HG--
extra : amend_source : 1bfdd72243d48020f66bfc7b1710455d122e660f
2022-07-30 20:49:35 +10:00
Ping Chen 6c6275d24c Bug 1762688 - Implement ensureFolderExists and appendMessageFromFile in ImapService.jsm. r=mkmelin
Enable test_copyThenMove.js.

Differential Revision: https://phabricator.services.mozilla.com/D152591
2022-07-26 00:16:41 +00:00
Geoff Lankow 40b8f392f9 Bug 1780324 - Load mail protocol JS modules only when required. r=rnons
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
2022-07-20 01:12:39 +12:00
Magnus Melin 658036deef Bug 1779145 - Port bug 1667455 to Thunderbird - Expose a "Services" property on all privileged JS scopes (like Cu/Cc/Ci). r=leftmostcat
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
2022-07-18 20:26:40 +10:00
Ping Chen fc083479a9 Bug 1762688 - Reuse local cache in ImapClient to fix test_bug460636 in debug build. r=mkmelin
If a message is already in local cache, no need to fetch from server again.

Differential Revision: https://phabricator.services.mozilla.com/D151680
2022-07-13 02:51:31 +00:00
Ben Campbell bfee7b7f60 Bug 1776727 - Have nsImapMailFolder::CompactAll() also start Expunge on affected folders. r=gds,sancus
Differential Revision: https://phabricator.services.mozilla.com/D150923

--HG--
extra : rebase_source : c7eb7ede94bda131b1deb5d223bf1f7236b7f9a6
2022-07-07 22:30:30 +00:00
Geoff Lankow 051f23a971 Bug 1779181 - Use static registration for mailnews services. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D151681

--HG--
extra : rebase_source : 90f741be6f845d403cac1167864d1b6e2318e2ca
extra : amend_source : 5b2f2827e81ecf4f497598e2331f33f7a98b3415
2022-07-12 21:34:40 +12:00
Geoff Lankow 499c063037 Bug 1779181 - Port bug 1686616 - Migrate all Services.py interfaces to components.conf. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D151588

--HG--
extra : rebase_source : 11c072dfd03577ff900aec0d6bfddd86fc0a8f1a
2022-07-12 16:27:28 +12:00
Ping Chen af0394f26d Bug 1762688 - Implement expunge/onlineCopy in ImapService.jsm. r=mkmelin
- Remove unused return value of nsIImapService.expunge
- Implement streamMessage in ImapMessageService.jsm
- Enable test_compactOfflineStore.

Differential Revision: https://phabricator.services.mozilla.com/D150883

Depends on D150313

--HG--
extra : rebase_source : 3ae28eb16d0784b73529dae293abdf660a731353
2022-07-12 05:54:12 +00:00
Ping Chen 627353f83c Bug 1762688 - Init ImapMessageService.jsm and implement SaveMessageToDisk. r=mkmelin
Enable three tests.

Differential Revision: https://phabricator.services.mozilla.com/D150313

Depends on D150062

--HG--
extra : rebase_source : 46767b47517e2700f2c052d745b1f4b38ef03fbe
2022-07-12 05:51:41 +00:00
Ping Chen df6461de00 Bug 1762690 - Enable test_autosync_date_constraints and test_bccProperty for imap-js. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D150062

--HG--
extra : __touch-noise__ : 2445396452
2022-07-12 22:49:37 +12:00
Geoff Lankow 73c81741b0 Bug 1773772 part 15 - Restore nsSyncStreamListener XPCOM registration. rs=me
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
2022-07-05 14:59:12 +12:00
Geoff Lankow bc5dc0df61 Bug 1773772 part 7 - Convert protocol binary components registration to components.conf. rs=aleca
Differential Revision: https://phabricator.services.mozilla.com/D150711

--HG--
extra : rebase_source : 8be520498e9cf1ea18c252dc2c853833bc497280
extra : absorb_source : f124d19358d70bb7c89ab49cc3cbea375836bb34
extra : histedit_source : 6fc2db413ceb219d347570164a64648f3e0350d2
2022-06-30 11:35:05 +12:00
Geoff Lankow 2416da6f9b Bug 1773772 part 0 - Stop using and remove CreateNewSyncStreamListener. r=aleca
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
2022-06-29 21:50:31 +12:00
Martin Giger 82ee738371 Bug 1776840 - Port bug 1776207: stop using ChromeUtils.generateNSGetFactory. r=#thunderbird-reviewers,aleca,darktrojan
Differential Revision: https://phabricator.services.mozilla.com/D150477

--HG--
extra : amend_source : cbbf160e7653ab04007ed3c5e479b3eea6b1c495
2022-06-28 15:54:33 +00:00
Gene Smith 0173bd74ad Bug 1768121 - Defer subsequent URLs in a session until the 1st URL's connection is authenticated. r=BenC
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
2022-06-26 05:30:56 +00:00
Gene Smith 7c7e7f1394 Bug 1770811 - Avoid non-stop imap chunk fetches if message expunged during fetch r=BenC
Differential Revision: https://phabricator.services.mozilla.com/D148866

--HG--
extra : moz-landing-system : lando
2022-06-26 05:30:56 +00:00
Ben Campbell 084affa87a Bug 1774952 - Don't attempt to read non-offline messages in nsImapMailFolder::CopyMessagesOffline(). r=mkmelin
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
2022-06-22 03:59:41 +00:00
Ping Chen 2faad412a2 Bug 1762690 - Support EXTERNAL auth in ImapClient.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D149848

--HG--
extra : amend_source : 2be717fe87edd5fe137ef144defa4d117956c92d
2022-06-21 13:23:54 +03:00
Ping Chen 6e96720c22 Bug 1762690 - Support STARTTLS in ImapClient.jsm and enable test_starttlsFailure.js. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D149691

--HG--
extra : amend_source : 50dd50a72889293bacb3115ae3ece6e0db79e59f
2022-06-21 13:23:37 +03:00
Ping Chen 3492ed9bf8 Bug 1762690 - Enable test_imapPasswordFailure.js for imap-js. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D149598

--HG--
extra : amend_source : 3216d9cc10a410bddc63d188e8a7674efc979c0e
2022-06-17 12:54:09 +03:00
Gene Smith e3d73be45b Bug 1773605 - Remove assert to fix test failures. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D149570

--HG--
extra : amend_source : 1b481cf950d0116cddcef95635e82265571de549
2022-06-17 10:50:23 +03:00
Gene Smith 7228a34994 Bug 1773605 - [Regression] Fix the folder copy playback timer handling r=benc
Differential Revision: https://phabricator.services.mozilla.com/D148986

--HG--
extra : rebase_source : 30166115a91ad7fa0fe390bcae35998949d20962
2022-06-16 12:58:42 +03:00
Ping Chen ed2e43fa06 Bug 1762690 - Add MailAuthenticator.getCramMd5Token to be reused by Smtp/Pop3/Imap clients. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D149351

--HG--
extra : rebase_source : d9ec49b34c5e3235b5cbbd761b0724cef26ac61f
2022-06-16 12:56:58 +03:00
Ben Campbell b0ae9da14e Bug 1742975 - Fix nsMsgDBFolder::EndNewOfflineMessage() for quarantined message writes. r=mkmelin
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
2022-06-16 10:41:13 +03:00
Magnus Melin ef3416e5a0 Bug 1774362 - Changes needed for bug 1607331 - Reject global this usage in JSM. mail/mailnews/calendar/chat r=freaktechnik
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
2022-06-15 20:10:42 +03:00
Ping Chen 9ab3c36331 Bug 1762690 - Support GSSAPI/NTLM auth in ImapClient.jsm. r=mkmelin
Enable test_imapAuthMethods.js.

Differential Revision: https://phabricator.services.mozilla.com/D148750

--HG--
extra : rebase_source : e5b2b37ab5b49c6f639f0c800f6b9303e97c94b4
extra : amend_source : 95e05939e096b3db5af34a251816edf4144de89d
2022-06-09 12:53:17 +03:00
Ping Chen f09c528679 Bug 1762690 - Support LOGIN/CRAM-MD5/OAUTH auth in ImapClient.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D148606

--HG--
extra : amend_source : 6f2f914794a15de012bcaedae5f5d601ccb5f99e
2022-06-08 12:41:55 +03:00
Ping Chen 7b708d9879 Bug 1762688 - Enable test_mailboxes for imap-js. r=mkmelin
Handle folder name with space and non-ascii characters.

Differential Revision: https://phabricator.services.mozilla.com/D147572

--HG--
rename : mailnews/imap/test/unit/xpcshell.ini => mailnews/imap/test/unit/xpcshell-cpp.ini
rename : mailnews/imap/test/unit/xpcshell_maildir.ini => mailnews/imap/test/unit/xpcshell_maildir-cpp.ini
2022-06-07 00:21:52 +00:00
Magnus Melin 6a22c4f397 Bug 1772064 - crash in @nsImapIncomingServer::DiscoveryDone. r=lasana
Differential Revision: https://phabricator.services.mozilla.com/D147830

--HG--
extra : amend_source : 1f42a1ea32e6fd5b31594ff62af5bae02d0d8a2a
2022-06-01 07:07:55 +00:00
Gene Smith d79467bcf3 Bug 1771409 - Remove detection of need for forced imap select. r=BenB,mkmelin
--HG--
extra : amend_source : 617e9cd58caa92e5f401e54112f94b1c35114468
2022-05-31 12:57:20 +03:00
Magnus Melin 77fd56deae Backed out changeset 5711dbdd2c78 (bug 1771409) for test failures. r=backout 2022-05-31 10:30:01 +03:00
Gene Smith ac3c0068e7 Bug 1771409 - Remove detection of need for forced imap select. r=BenB,mkmelin
--HG--
extra : amend_source : 848eba6ee414d3c6b1dc15e403a90a97323271d4
2022-05-27 20:11:37 -04:00
Ping Chen a06c372faf Bug 1762688 - Support renaming folder in ImapService.jsm. r=mkmelin
Depends on D147398.

Differential Revision: https://phabricator.services.mozilla.com/D147399

--HG--
extra : amend_source : 3062ea4c0d88f0400d2fe262be2035c188bdea56
2022-05-27 13:49:21 +03:00
Ping Chen 82b0194c15 Bug 1762688 - Remove some unused nsIURI return values in nsIImapService.idl. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D147398

--HG--
extra : amend_source : c5ec78ac3f2fbb0953be94807973fd12e0718ad0
2022-05-26 13:21:27 +03:00
Ping Chen b6e130263e Bug 1770342 - Remove the aRealFlag argument from nsIMsgAccountManager.findServerByURI. r=mkmelin
Depends on D146987.

Differential Revision: https://phabricator.services.mozilla.com/D146988

--HG--
extra : amend_source : 235dc0e1d0040ea8249c4c56161cc5b04375404d
2022-05-24 12:34:13 +03:00
Ping Chen 93a2d1c6a9 Bug 1762690 - Implement discoverAllFolders in ImapClient.jsm to sync folders with server. r=mkmelin
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
2022-05-19 13:31:07 +03:00
Geoff Lankow ffb0a386cf Bug 1769595 - Port bug 1514936 - Get rid of support for aggregated components. r=#thunderbird-reviewers,john.bieling
Differential Revision: https://phabricator.services.mozilla.com/D146523

--HG--
extra : rebase_source : 56f139a166c97d4771907e0744e2a431ed79b187
extra : histedit_source : 1f2ced28975ad850d27c3d13bb1d4418801b234a
2022-05-17 12:42:24 +12:00
Geoff Lankow a92726dbe9 Bug 1769595 - Port bug 1769442 - Remove nsIFactory::lockFactory. r=#thunderbird-reviewers,john.bieling
Differential Revision: https://phabricator.services.mozilla.com/D146522

--HG--
extra : rebase_source : 14726b1e2810363fd40decbf33e98d8f08baae0f
extra : histedit_source : 4510981486d93eba384b30bc2d5cb4f0c0687ca4
2022-05-17 11:48:23 +12:00
Gene Smith ffbffdf765 Bug 1747173 - IMAP flag changes not seen when changed by another client after inactivity timeout. r=benc 2022-05-17 14:08:22 -04:00
Ping Chen f55c561ea5 Bug 1483485 - Remove realHostName/realUsername from nsIMsgIncomingServer. r=mkmelin
Skip and fix a few tests.

Depends on D144790.

Differential Revision: https://phabricator.services.mozilla.com/D145301

--HG--
extra : amend_source : 31a1b0ca7a816f036ea74d887b287abed445fae2
2022-05-13 12:52:00 +03:00
Gene Smith 02b6d7f923 Bug 1759883 - Subscribe/unsubscribe to oauth2 imap folders requires restart. r=benc
--HG--
extra : amend_source : c54397735387248e47fe7acb99e63f70ddce20d5
2022-05-12 13:22:16 +03:00
Ping Chen c392d15fdf Bug 1762688 - Implement ImapChannel to read msg from local cache or server. r=mkmelin
Depends on D146037.

Differential Revision: https://phabricator.services.mozilla.com/D146038

--HG--
extra : rebase_source : 2d22914935964323061475dc6b9f3910c7b9981c
2022-05-11 13:27:28 +03:00
Ping Chen 55947a707b Bug 1762688 - Init ImapProtocolHandler.jsm and ImapChannel.jsm to handle imap: url. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D146037

--HG--
extra : rebase_source : 6a52a64a6e3bbfa65f8866626027acf175e1fbd0
2022-05-11 13:27:08 +03:00
Ben Campbell 3e655bee0e Bug 1733849 - Add nsIMsgFolder.getLocalMsgStream() to unify local/offline message reading. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D144503

--HG--
extra : rebase_source : bbde9b5d5a252a1332915a292bce5135ac5e692c
2022-05-11 13:26:10 +03:00
Ping Chen 92c4e28ad4 Bug 1762690 - Handle EXISTS and EXPUNGE in NOOP responses. r=mkmelin
Delete messages not found on server.

Depends on D145825.

Differential Revision: https://phabricator.services.mozilla.com/D145826

--HG--
extra : rebase_source : 26a62fafae96bf70188f1a0c15576b6e80c80eb6
2022-05-07 08:17:27 +00:00
Ping Chen ff032af91a Bug 1762690 - Rewrite ImapResponse to do incremental parsing. r=mkmelin
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
2022-05-10 00:43:53 +00:00
Ping Chen 36c713a3d0 Bug 1762690 - Update message flags in SELECT and NOOP response. r=mkmelin
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
2022-05-05 03:59:24 +00:00
Ping Chen cc876127de Bug 1762690 - Use IDLE and NOOP commands to receive updates from server. r=mkmelin
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
2022-05-05 03:59:24 +00:00
Rachel Martin eb2ad913ef Bug 1766974 - Fix typos in mail and mailnews found with codespell. r=Paenglab,john.bieling,kaie
--HG--
extra : amend_source : 256a23051dda81f4e807183e44947a731d36b756
2022-04-30 13:30:36 +03:00
Magnus Melin 67ef3b6e37 Bug 1767005 - Port bug 683785 to Thunderbird - Create timers directly instead of with do_CreateInstance. r=rjl
Differential Revision: https://phabricator.services.mozilla.com/D145068

--HG--
extra : amend_source : 71cc123b6f56f2db0298d7e7ca273b5d1da7a96e
2022-04-29 15:06:00 +03:00
Ping Chen bde721aa66 Bug 1762689 - Prevent showing multiple auth prompt for the same server. r=mkmelin
Depends on D144698.

Differential Revision: https://phabricator.services.mozilla.com/D144699

--HG--
extra : amend_source : 0b86193ba743f63c7a36329a5ebdf17593ccb499
2022-04-27 13:01:53 +03:00
Ping Chen 6a9322e949 Bug 1762689 - Reuse connections in ImapIncomingServer.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D144698

--HG--
extra : amend_source : aa160c67980208c3e9770af29e71fec5148da4b1
2022-04-27 13:01:38 +03:00
Magnus Melin eebcff010a Bug 1766247 - Port Bug 1766238 to Thunderbird - stop passing more than one argument to ChromeUtils.import. r=freaktechnik
Differential Revision: https://phabricator.services.mozilla.com/D144567

--HG--
extra : amend_source : 4dc54e1b5e3884edec427a734e70772a976bc6ce
2022-04-26 13:17:44 +03:00
Ping Chen 853101e7e4 Bug 1762690 - Support setting msg flags in ImapClient.jsm. r=mkmelin
Load msg in messagepane works as well.

Depends on D144253.

Differential Revision: https://phabricator.services.mozilla.com/D144254

--HG--
extra : amend_source : 4618d96542b6f4ba7e523d3efabe2be76549e2aa
2022-04-22 09:11:17 +03:00
Ping Chen cd116e28d9 Bug 1762688 - Remove unused outURL from addMessageFlags/subtractMessageFlags in nsIImapService.idl. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D144253

--HG--
extra : amend_source : 22bf3978e604a9d621cbbda9f2e76b592f17491d
2022-04-22 09:11:00 +03:00
Alessandro Castellani 654a1fdc49 Bug 1765650 - Port bug 1735746 to add extra argument to extProtService->LoadURI method. rs=bustage-fix
Differential Revision: https://phabricator.services.mozilla.com/D144230

--HG--
extra : moz-landing-system : lando
2022-04-20 22:47:38 +00:00
Ping Chen f36ea9373f Bug 1762690 - Save fetched IMAP msg to folder. r=mkmelin
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
2022-04-19 11:00:40 +02:00
Ping Chen 6012a71398 Bug 1762690 - Change getMsgHdrs to scriptable msgHdrs attribute in nsIImapHeaderInfo. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D143965

--HG--
extra : amend_source : 53d3486411a51fb6845d166699336ec1c03cd317
2022-04-19 10:59:53 +02:00
Ping Chen dd1e0b328e Bug 1762690 - Introduce ImapResponse.jsm to parse server responses. r=mkmelin
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
2022-04-13 11:10:41 +02:00
Ping Chen 5abfa33aca Bug 1762690 - Support PLAIN auth in ImapClient.jsm. r=mkmelin
Depends on D143014.

Differential Revision: https://phabricator.services.mozilla.com/D143015

--HG--
extra : amend_source : 488571159d3dbcd6eeb8330d2ae27438da72f50d
2022-04-07 12:44:23 +03:00
Ping Chen b0c59cd39a Bug 1762690 - Init ImapClient.jsm to interact with IMAP server.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D143014

--HG--
extra : amend_source : b1c69cfd20d135bab7ea4044ca5df0fb9572a170
2022-04-07 12:44:11 +03:00
Ping Chen 5e6c5732cc Bug 1762688 - Init ImapModuleLoader.jsm to prepare for rewriting IMAP in JS. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D142751

--HG--
extra : amend_source : 27015dcdd3f0cc6b965041065951a588c2b758b6
2022-04-04 12:28:21 +02:00
Sean Burke 121378611f Bug 1761129 - remove misplaced Java modelines. r=#thunderbird-reviewers,john.bieling
Differential Revision: https://phabricator.services.mozilla.com/D141898

Depends on D141897

--HG--
extra : rebase_source : ee222beb6d290b01de2b08600d80d3fb2c47e5e4
extra : histedit_source : 1d3416cb5fab73a9ae0889aa5bb008334b28af29
2022-03-23 22:21:20 +00:00
Ben Campbell 2e0edf0ee9 Bug 1760353 - Fix possible bogus release of un-held waitForBodyIdsMonitor object in IMAP. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D141815

--HG--
extra : rebase_source : eb0f8b25a6669a2d3727a1dbd8f3f9ea7bbf1d8d
extra : histedit_source : 0d42272cd54422be2ab4504d8ef17db88f44b0a6
2022-03-23 02:45:22 +00:00
Nicolai Kasper f21f8810e2 Bug 1571683 - Part 7: Remove asyncTestUtils.js. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D141386

--HG--
extra : moz-landing-system : lando
2022-03-22 04:47:12 +00:00
Magnus Melin cf64483e8c Bug 1760353 - Fix m_waitForBodyIdsMonitor issue after bug 1759501. r=rjl
--HG--
extra : amend_source : 442b865de0044b716558e07fc22bf50321a74d9a
2022-03-18 23:01:18 +02:00
Ben Campbell 61fcd31e91 Bug 1756520 - Separate multifolder compaction management from folder compaction classes. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D140996

--HG--
extra : amend_source : 7f8dd34321607d91d96a7c5f1a74cf5622498952
2022-03-16 12:31:48 +02:00
Ben Campbell 9efc4064f5 Bug 1756520 - Remove redundant arg in nsIMsgFolder.compactAll(). r=mkmelin
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
2022-02-22 05:57:59 +00:00
Ben Campbell 9958d1f767 Bug 1756520 - Remove nsMsgDBFolder::CompactOfflineStore(). r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D139327
2022-02-22 00:23:33 +00:00
Geoff Lankow ae96a55794 Bug 1751880 - Register mailnews/imap/test/unit/xpcshell_maildir.ini as a separate test manifest. r=BenC
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
2022-02-07 22:36:08 +00:00
Nicolai Kasper 8556af48e6 Bug 1571683 - Part 2: Replace asyncTestUtils.js functionality with promises in mailnews/imap/test/unit/**. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D136609
2022-01-24 15:36:39 -05:00
Ben Campbell a497e0f1d5 Bug 1718998 - Add comment blocks above some nsImapProtocol URL-processing functions. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D136090
2022-01-19 21:29:37 +00:00
Ben Campbell ec09e99b87 Bug 1750474 - Misc tidyups in nsImapMailFolder::UpdateFolderWithListener(). r=mkmelin
- Removed some redundant NS_SUCCEEDED(rv) checking.
- Shifted about selectFolder logic for clarity.

Differential Revision: https://phabricator.services.mozilla.com/D136091

--HG--
extra : amend_source : cf87b0b78be498a4400a86e68b2e9e464114c696
2022-01-19 12:10:27 +02:00
Ben Campbell 19632e877b Bug 1748940 - Use nsTArray<> instead of nsTArray<>* for nsIMAPBodypartMultipart subpart list. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D135304

--HG--
extra : moz-landing-system : lando
2022-01-17 21:37:45 +00:00
Ben Campbell 4710249ad8 Bug 1748940 - Assorted minor nsImapBodyShellCache tidying. r=mkmelin
- 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
2022-01-17 21:37:45 +00:00
Ben Campbell d187b46971 Bug 847356 - Ensure nsImapProtocol is kept in existence for duration of nsImapBodyShell::Generate(). r=mkmelin
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
2022-01-17 12:17:32 +02:00
Rachel Martin 19429999ab Bug 1746695 - Improve method and variable names related to charset detection. r=mkmelin
--HG--
extra : amend_source : e085fc3ed69dc2d119d2c6953d1db0e5bb2f2f99
2021-12-21 12:10:15 +02:00
Magnus Melin 85f2768bcf Bug 1668926 - fix unused rv value in RecursiveCopy(). r=benc
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
2021-12-15 09:00:36 +02:00
Magnus Melin 49295c9c3f Bug 1668926 - fix unused value in nsImapMailFolder::​SyncFlags(). r=benc
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
2021-12-15 11:58:08 +02:00
Geoff Lankow d95a6a9fac Bug 1745875 - Port bug 1741665 - Align nsCString's public size_type better with other C++ APIs. r=mkmelin
Port of https://hg.mozilla.org/mozilla-central/rev/43563b9a5f5d132449ec86456cf246b85ccf8306.

Differential Revision: https://phabricator.services.mozilla.com/D133720

--HG--
extra : amend_source : 54dc769853a602a69c2347ef9613235bf9b46e63
2021-12-14 18:47:42 +13:00
Nicolai Kasper 9b574bec3e Bug 1676114 - Part 2: Copy contents of messageModifier.js into MessageGenerator.jsm. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D132915
2021-12-09 12:42:54 +00:00
Makoto Kato cc9fb28213 Bug 1742991 - nsImapProtocol should not inherit nsIRunnable. r=mkmelin
`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
2021-12-07 06:56:27 +00:00
Gene Smith a1a691cfde Bug 1737293 - Prevent large headers from triggering NS_ASSERTION. r=benc
Note: This change only affects debug builds.
2021-11-26 01:08:28 -05:00
Rob Lemley 386bb17fb7 Backed out changeset 9fe3c5e2056f (bug 1737293) for build errors. r=backout a=rjl 2021-12-03 17:57:18 -05:00
Gene Smith aa38ac774f Bug 1737293 - Prevent large headers from triggering NS_ASSERTION. r=benc
Note: This change only affects debug builds.

--HG--
extra : amend_source : ac27f6b2f36c1e40eb3268614310f10915e5e103
2021-11-26 01:08:28 -05:00
Ping Chen 93dc9dbbb5 Bug 1741805 - Prevent tmp attachments being removed before msg is created in nsMsgCompose. r=mkmelin
- 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
2021-12-02 08:10:33 +00:00
Rob Lemley 0452cde9be Bug 1743868 - Port bug 1705211. rs=bustage-fix
Differential Revision: https://phabricator.services.mozilla.com/D132622

--HG--
extra : amend_source : c7a9a535d018c15236945a9e7a9fe2a5048bb8c0
2021-12-01 13:32:02 -05:00
Rachel Martin e95f982936 Bug 1739789 - Change search-related URI APIs and all other remaining ones to AUTF8String. r=mkmelin 2021-11-26 22:43:40 +01:00
Rachel Martin dbc4af4f95 Bug 1739903 - Change filter-related URI APIs to AUTF8String. r=mkmelin 2021-11-25 12:42:03 +02:00
Rachel Martin 41593018fa Bug 1739814 - Change remaining URI APIs to from raw string to smart string. r=mkmelin 2021-11-22 20:00:08 +01:00
Geoff Lankow e65771a4d7 Bug 1742503 - Fix build bustage: 'mozilla/dom/FetchTypes.h' file not found. rs=bustage-fix
Differential Revision: https://phabricator.services.mozilla.com/D131859

--HG--
extra : amend_source : 066dc4c8b81efa2459f472c0a995358e20da75a7
2021-11-23 11:34:57 +13:00
Rachel Martin 1471a7836a Bug 1739814 - Change more URI APIs to from raw string to smart string. Fixes saving drafts and smart/unified/virtual folders. r=mkmelin 2021-11-22 12:22:49 +02:00