From 31949afa885236c3ab35a659463a3c06379013c6 Mon Sep 17 00:00:00 2001 From: "bugzilla%standard8.demon.co.uk" Date: Fri, 13 Apr 2007 17:52:41 +0000 Subject: [PATCH] Bug 160942 JS error exception closing new message windows: sMsgComposeService is not defined. (Ev1-TB) p=Serge Gautherie ,r=mscott --- .../compose/content/MsgComposeCommands.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/mail/components/compose/content/MsgComposeCommands.js b/mail/components/compose/content/MsgComposeCommands.js index 48763e3f18b..82f109e2c80 100644 --- a/mail/components/compose/content/MsgComposeCommands.js +++ b/mail/components/compose/content/MsgComposeCommands.js @@ -309,6 +309,7 @@ var stateListener = { // Notify the SendListener that Send has been aborted and Stopped if (gMsgCompose) gMsgCompose.onSendNotPerformed(null, Components.results.NS_ERROR_ABORT); + MsgComposeCloseWindow(true); } } @@ -1478,10 +1479,7 @@ function WizCallback(state) } else { - if (gMsgCompose) - gMsgCompose.CloseWindow(false); //Don't try to recyle a bogus window - else - window.close(); + MsgComposeCloseWindow(false); // Don't try to recycle a bogus window // window.tryToClose=ComposeCanClose; } } @@ -1556,10 +1554,7 @@ function ComposeLoad() else window.alert(errorMsg); - if (gMsgCompose) - gMsgCompose.CloseWindow(false); //Don't try to recycle a bogus window - else - window.close(); + MsgComposeCloseWindow(false); // Don't try to recycle a bogus window return; } window.tryToClose=ComposeCanClose; @@ -2564,6 +2559,8 @@ function MsgComposeCloseWindow(recycleIt) { if (gMsgCompose) gMsgCompose.CloseWindow(recycleIt); + else + window.close(); } function GetLastAttachDirectory()