+++ This bug was initially created as a clone of Bug #834020 +++
nsIEnumerator seems obsolete per https://developer.mozilla.org/en-US/docs/XPCOM_array_guide.
I think can remove the support from mailnews/base/util/iteratorUtils.jsm
when the nsISupportsArray is killed from comm-central and mozilla-central.
As the the users of these arrays can call .enumerate() them and that that produces an nsIEnumerator that the user may want to iterate on.
Of course nsIEnumerator must be killed first too, but that is done for c-c in bug 834020. We must wait for m-c now, in bug 7795.

I wouldn't have expected people to use iteratorUtils on core enumerators. There are only a few:
nsISelectionPrivate::GetEnumerator
nsICollection::Enumerate
nsIInterfaceInfoManager has two
PSM has three.
I'm not even sure you can count nsICollection::Emumerate because you can use iteratorUtils on an nsISupportsArray directly.

I'm thinking of this stuff:
mailnews:
db/gloda/modules/index_msg.js: for each (let destMsgHdr in fixIterator(aDestMsgHdrs.enumerate(),
db/gloda/modules/index_msg.js: for each (let srcMsgHdr in fixIterator(aSrcMsgHdrs.enumerate(),
db/gloda/modules/index_msg.js: for each (let destMsgHdr in fixIterator(aDestMsgHdrs.enumerate(),
test/resources/folderEventLogHelper.js: for each (let msgHdr in fixIterator(aMsgs.enumerate(),
test/resources/folderEventLogHelper.js: for each (let msgHdr in fixIterator(aMsgs.enumerate(),
test/resources/folderEventLogHelper.js: for each (let msgHdr in fixIterator(aSrcMsgs.enumerate(),
test/resources/folderEventLogHelper.js: for each (let msgHdr in fixIterator(aDestMsgs.enumerate(),
mail:
base/content/folderPane.js: for each (let folderWithFlag in fixIterator(foldersWithFlag.enumerate(),
base/content/editContactOverlay.js: for (let card in fixIterator(list.addressLists.enumerate())) {
base/modules/MailUtils.js: for each (let folder in fixIterator(folders.enumerate(), Ci.nsIMsgFolder)) {
components/cloudfile/cloudFileAccounts.js: for (let entry in fixIterator(categoryManager.enumerateCategory(CATEGORY),
test/mozmill/cloudfile/test-cloudfile-add-account-dialog.js: for (let entry in fixIterator(gCategoryMan.enumerateCategory(kCategory),
Couldn't find any in suite.

If we rewrite or audit these places we could probably remove it. With the decision that people having some nsISupportsArray or nsIEnumerator got from m-c code simply must cope with it without fixIterator.

(In reply to aceman from comment #2)
> db/gloda/modules/index_msg.js: for each (let destMsgHdr in fixIterator(aDestMsgHdrs.enumerate(),
> db/gloda/modules/index_msg.js: for each (let srcMsgHdr in fixIterator(aSrcMsgHdrs.enumerate(),
> db/gloda/modules/index_msg.js: for each (let destMsgHdr in fixIterator(aDestMsgHdrs.enumerate(),
> test/resources/folderEventLogHelper.js: for each (let msgHdr in fixIterator(aMsgs.enumerate(),
> test/resources/folderEventLogHelper.js: for each (let msgHdr in fixIterator(aMsgs.enumerate(),
> test/resources/folderEventLogHelper.js: for each (let msgHdr in fixIterator(aSrcMsgs.enumerate(),
> test/resources/folderEventLogHelper.js: for each (let msgHdr in fixIterator(aDestMsgs.enumerate(),
> base/content/folderPane.js: for each (let folderWithFlag in fixIterator(foldersWithFlag.enumerate(),
> base/content/editContactOverlay.js: for (let card in fixIterator(list.addressLists.enumerate())) {
> base/modules/MailUtils.js: for each (let folder in fixIterator(folders.enumerate(), Ci.nsIMsgFolder)) {
fixIterator works on an nsISupportsArray, no need to call .enumerate() on it first. So if you fix those you can go ahead and remove the support in fixIterator for nsIEnumerator!
> components/cloudfile/cloudFileAccounts.js: for (let entry in fixIterator(categoryManager.enumerateCategory(CATEGORY),
> test/mozmill/cloudfile/test-cloudfile-add-account-dialog.js: for (let entry in fixIterator(gCategoryMan.enumerateCategory(kCategory),
Not an nsIEnumerator.

Comment on attachment 712020[details][diff][review]
patch - mailnews
Thanks for fixing the let each to let while you were at it!
This is pretty straightforward, so I think just my review should suffice.