From 99d783e7716ab5ddee9bb7bdf913fcadcd7ced9c Mon Sep 17 00:00:00 2001 From: "mkmelin+mozilla%iki.fi" Date: Mon, 21 Apr 2008 16:52:32 +0000 Subject: [PATCH] Bug 424764: Error: selectedFolders[0]/msgFolder is undefined when opening the File menu of the standalone msg window r=philringnalda git-svn-id: svn://10.0.0.236/trunk@250561 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/mail/base/content/mailWindowOverlay.js | 12 ++---------- mozilla/mail/base/content/messageWindow.js | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/mozilla/mail/base/content/mailWindowOverlay.js b/mozilla/mail/base/content/mailWindowOverlay.js index 86cfbc027d2..ce9d56adb60 100644 --- a/mozilla/mail/base/content/mailWindowOverlay.js +++ b/mozilla/mail/base/content/mailWindowOverlay.js @@ -2616,14 +2616,6 @@ function setMsgHdrPropertyAndReload(aProperty, aValue) } } -function checkMsgHdrPropertyIsNot(aProperty, aValue) -{ - // we want to get the msg hdr for the currently selected message, - // get the appropiate property on it and then test against value. - var msgHdr = msgHdrForCurrentMessage(); - return (msgHdr && msgHdr.getUint32Property(aProperty) != aValue); -} - function MarkCurrentMessageAsRead() { ClearPendingReadTimer(); @@ -2650,10 +2642,10 @@ function OnMsgParsed(aUrl) var findBar = document.getElementById("FindToolbar"); if (!findBar.hidden) findBar.onFindAgainCommand(false); - + // run the phishing detector on the message var msgHdr = msgHdrForCurrentMessage(); - if (msgHdr.getUint32Property("notAPhishMessage")) + if (msgHdr && msgHdr.getUint32Property("notAPhishMessage")) gPhishingDetector.analyzeMsgForPhishingURLs(aUrl); // notify anyone (e.g., extensions) who's interested in when a message is loaded. diff --git a/mozilla/mail/base/content/messageWindow.js b/mozilla/mail/base/content/messageWindow.js index 864fd3cf00b..575e4c662c9 100644 --- a/mozilla/mail/base/content/messageWindow.js +++ b/mozilla/mail/base/content/messageWindow.js @@ -564,7 +564,7 @@ function OnUnloadMessageWindow() function GetSelectedMsgFolders() { - var folderArray = new Array(1); + var folderArray = []; var msgFolder = GetLoadedMsgFolder(); if (msgFolder) folderArray[0] = msgFolder;