Bug 1629301 - Skip bad history entries so they don't cause errors. r=mkmelin
authorJorg K <jorgk@jorgk.com>
Thu, 16 Apr 2020 19:17:20 +0300
changeset 38857 cc0eebd9ddbd3bdec2752fb77692413f2c87d4cd
parent 38856 7c79228f232df09e1f6787a62444decd311668c8
child 38858 5aa91a099bfcf2c3905e8109d33d2b8fd174c248
push id401
push userclokep@gmail.com
push dateMon, 01 Jun 2020 20:41:59 +0000
reviewersmkmelin
bugs1629301
Bug 1629301 - Skip bad history entries so they don't cause errors. r=mkmelin
mail/base/content/mailWindowOverlay.js
--- a/mail/base/content/mailWindowOverlay.js
+++ b/mail/base/content/mailWindowOverlay.js
@@ -1511,17 +1511,23 @@ function populateHistoryMenu(menuPopup, 
       // Where did the folder go?
       continue;
     }
     navDebug(
       "folder URI = " + folder.URI + " pretty name " + folder.prettyName + "\n"
     );
 
     var menuText = "";
-    var msgHdr = messenger.msgHdrFromURI(historyArray[i]);
+    var msgHdr;
+    try {
+      msgHdr = messenger.msgHdrFromURI(historyArray[i]);
+    } catch (ex) {
+      // Let's just ignore this history entry.
+      continue;
+    }
     var msgSubject = msgHdr.mime2DecodedSubject;
     var msgAuthor = msgHdr.mime2DecodedAuthor;
 
     if (!msgAuthor && !msgSubject) {
       // Avoid empty entries in the menu. The message was most likely (re)moved.
       continue;
     }