rem: gCurrentFolderUri = folder ? folder.folderURL : null; 
add: gCurrentFolderUri = folder ? folder.URI : null; 
context: function delayedOnLoadMessageWindow(){	HideMenus();  AddMailOfflineObserver();	CreateMailWindowGlobals();	CreateMessageWindowGlobals();  AddToolBarPrefListener();  ShowHideToolBarButtons()	verifyAccounts(null);	InitMsgWindow();	messenger.SetWindow(window, msgWindow);	InitializeDataSources();	// FIX ME - later we will be able to use onload from the overlay	OnLoadMsgHeaderPane();  try {    var nsIFolderListener = Components.interfaces.nsIFolderListener;    var notifyFlags = nsIFolderListener.removed | nsIFolderListener.event | nsIFolderListener.intPropertyChanged;    mailSession.AddFolderListener(folderListener, notifyFlags);  } catch (ex) {    dump("Error adding to session: " +ex + "\n");  }  var originalView = null;  var folder = null;  var messageUri;  var loadCustomMessage = false;       //set to true when either loading a message/rfc822 attachment or a .eml file	if (window.arguments)	{		if (window.arguments[0])    {      try      {        messageUri = window.arguments[0];        if (messageUri instanceof Components.interfaces.nsIURI)        {          loadCustomMessage = /type=x-message-display/.test(messageUri.spec);          gCurrentMessageUri = messageUri.spec;          if (messageUri instanceof Components.interfaces.nsIMsgMailNewsUrl)            folder = messageUri.folder;        }      }       catch(ex)       {        folder = null;        dump("## ex=" + ex + "\n");      }      if (!gCurrentMessageUri)			gCurrentMessageUri = window.arguments[0];    }		else			gCurrentMessageUri = null;		if (window.arguments[1])			gCurrentFolderUri = window.arguments[1];		else      gCurrentFolderUri = folder ? folder.folderURL : null;    if (window.arguments[2])      originalView = window.arguments[2];      	}	  CreateView(originalView);   setTimeout(OnLoadMessageWindowDelayed, 0, loadCustomMessage);    SetupCommandUpdateHandlers();}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/d6aed9a77aae527e153d04060f0190fc08d07ab0/messageWindow.js/buggy/mail/base/content/messageWindow.js