Backed out changeset 6533be800ca3 (bug 1762688) for test failures on debug. rs=backout

This commit is contained in:
Magnus Melin 2022-09-15 20:38:55 +10:00
Родитель 225046910e
Коммит 95a1aeb0e8
8 изменённых файлов: 10 добавлений и 56 удалений

Просмотреть файл

@ -140,7 +140,6 @@ class ImapClient {
*/
discoverAllFolders(folder) {
this._logger.debug("discoverAllFolders", folder.URI);
let supportsListExtended = this._capabilities.includes("LIST-EXTENDED");
let handleListResponse = res => {
this._hasTrash = res.mailboxes.some(
mailbox => mailbox.flags & ImapUtils.FLAG_IMAP_TRASH
@ -165,31 +164,13 @@ class ImapClient {
};
this._nextAction = res => {
if (supportsListExtended) {
this._nextAction = res => {
handleListResponse(res);
this._actionFinishFolderDiscovery();
return;
}
this._nextAction = res2 => {
// Per rfc3501#section-6.3.9, if LSUB returns different flags from LIST,
// use the LIST responses.
for (let mailbox of res2.mailboxes) {
let mailboxFromList = res.mailboxes.find(x => x.name == mailbox.name);
if (
mailboxFromList?.flags &&
mailboxFromList?.flags != mailbox.flags
) {
mailbox.flags = mailboxFromList.flags;
}
}
handleListResponse(res2);
this._actionFinishFolderDiscovery();
};
this._sendTagged('LSUB "" "*"');
};
this._sendTagged(
supportsListExtended ? 'LIST (SUBSCRIBED) "" "*"' : 'LIST "" "*"'
);
this._sendTagged('LIST "" "*"');
}
/**
@ -241,17 +222,6 @@ class ImapClient {
this._sendTagged(`RENAME "${oldName}" "${newName}"`);
}
/**
* Send LIST command for a folder.
* @param {nsIMsgFolder} folder - The folder to list.
*/
listFolder(folder) {
this._logger.debug("listFolder", folder.URI);
this._actionList(this._getServerFolderName(folder), () => {
this._actionDone();
});
}
/**
* Ensure a folder exists on the server. Create one if not already exists.
* @param {nsIMsgFolder} parent - The parent folder to check.

Просмотреть файл

@ -242,11 +242,7 @@ class ImapIncomingServer extends MsgIncomingServer {
imapFolder.explicitlyVerify ||
(folder.hasSubFolders && this._noDescendentsAreVerified(folder))
) {
let isNamespace = false;
try {
isNamespace = imapFolder.isNamespace;
} catch (e) {}
if (!isNamespace) {
if (!imapFolder.isNamespace) {
// If there are no subfolders and this is unverified, we don't want to
// run this url. That is, we want to undiscover the folder.
// If there are subfolders and no descendants are verified, we want to

Просмотреть файл

@ -384,7 +384,7 @@ class MailboxData {
"\\NOINFERIORS":
// RFC 5258 \NoInferiors implies \HasNoChildren
ImapUtils.FLAG_NO_INFERIORS | ImapUtils.FLAG_HAS_NO_CHILDREN,
"\\NOSELECT": ImapUtils.FLAG_NO_SELECT,
"\\NOSELECT": ImapUtils.NO_SELECT,
"\\TRASH": ImapUtils.FLAG_IMAP_TRASH | ImapUtils.FLAG_IMAP_XLIST_TRASH,
"\\SENT": ImapUtils.FLAG_IMAP_SENT,
"\\SPAM": ImapUtils.FLAG_IMAP_SPAM,

Просмотреть файл

@ -256,17 +256,6 @@ class ImapService {
});
}
listFolder(folder, urlListener) {
this._withClient(folder, client => {
let runningUrl = client.startRunningUrl(urlListener);
runningUrl.QueryInterface(Ci.nsIImapUrl).imapAction =
Ci.nsIImapUrl.nsImapListFolder;
client.onReady = () => {
client.listFolder(folder);
};
});
}
storeCustomKeywords(folder, msgWindow, flagsToAdd, flagsToSubtract, uids) {
return this._withClient(folder, (client, runningUrl) => {
client.startRunningUrl(null, msgWindow, runningUrl);

Просмотреть файл

@ -76,10 +76,6 @@ add_task(async function testListSubscribed() {
});
add_task(async function testZimbraServerVersions() {
if (Services.prefs.getBoolPref("mailnews.imap.jsmodule", false)) {
return;
}
// older versions of Zimbra can crash if we send LIST (SUBSCRIBED) so we want
// to make sure that we are checking for versions

Просмотреть файл

@ -13,8 +13,11 @@ prefs =
[test_imapHdrChunking.js]
[test_imapHighWater.js]
[test_imapUndo.js]
[test_listClosesDB.js]
[test_listSubscribed.js]
[test_localToImapFilter.js]
[test_localToImapFilterQuarantine.js]
[test_lsub.js]
[test_nsIMsgFolderListenerIMAP.js]
[test_offlineCopy.js]
[test_offlineDraftDataloss.js]

Просмотреть файл

@ -34,8 +34,5 @@
[test_imapUrls.js]
[test_largeOfflineStore.js]
skip-if = os == 'mac'
[test_listClosesDB.js]
[test_listSubscribed.js]
[test_lsub.js]
[test_mailboxes.js]
[test_starttlsFailure.js]

Просмотреть файл

@ -13,8 +13,11 @@ prefs =
[test_imapHdrChunking.js]
[test_imapHighWater.js]
[test_imapUndo.js]
[test_listClosesDB.js]
[test_listSubscribed.js]
[test_localToImapFilter.js]
[test_localToImapFilterQuarantine.js]
[test_lsub.js]
[test_nsIMsgFolderListenerIMAP.js]
[test_offlineCopy.js]
[test_offlineDraftDataloss.js]