comment out the msgWindow variable that we were creating

every time this script was loaded. This was happening
every time we loaded a message. It had a side effect
of causing a uri dispatching crash and it had severe performance implications. We shouldn't be creating
a new msg window every time we display a message.
this may have a bad side effect when we support multiple
3-pane windows because we can no longer call SetWindow.
This commit is contained in:
mscott%netscape.com 1999-11-30 22:24:44 +00:00
parent f6e3351358
commit a3120f1082

View File

@ -26,15 +26,15 @@ var msgWindowProgID = "component://netscape/messenger/msgwindow";
var messenger = Components.classes['component://netscape/messenger'].createInstance();
messenger = messenger.QueryInterface(Components.interfaces.nsIMessenger);
//Create message window object
var msgWindow = Components.classes[msgWindowProgID].createInstance();
msgWindow = msgWindow.QueryInterface(Components.interfaces.nsIMsgWindow);
//var msgWindow = Components.classes[msgWindowProgID].createInstance();
//msgWindow = msgWindow.QueryInterface(Components.interfaces.nsIMsgWindow);
function OpenAttachURL(url, displayName, messageUri)
{
dump("\nOpenAttachURL from XUL\n");
dump(url);
dump("\n");
messenger.SetWindow(window, msgWindow);
// messenger.SetWindow(window, msgWindow);
messenger.openAttachment(url, displayName, messageUri);
}