Bug 514976 - Inline mailSessionContractID string/value.
r=neil sr=Standard8.
This commit is contained in:
Родитель
74c43c47db
Коммит
ef8631ea2f
|
@ -449,9 +449,9 @@ function ViewPageSource(messages)
|
|||
|
||||
try {
|
||||
// First, get the mail session
|
||||
const mailSessionContractID = "@mozilla.org/messenger/services/session;1";
|
||||
const nsIMsgMailSession = Components.interfaces.nsIMsgMailSession;
|
||||
var mailSession = Components.classes[mailSessionContractID].getService(nsIMsgMailSession);
|
||||
var mailSession = Components.classes["@mozilla.org/messenger/services/session;1"]
|
||||
.getService(nsIMsgMailSession);
|
||||
var mailCharacterSet = "charset=" + msgWindow.mailCharacterSet;
|
||||
|
||||
for (var i = 0; i < numMessages; i++)
|
||||
|
|
|
@ -513,11 +513,11 @@ function SearchNewFolderOkCallback(name, uri)
|
|||
imapFolder = msgFolder.QueryInterface(Components.interfaces.nsIMsgImapMailFolder);
|
||||
}
|
||||
catch(ex) {}
|
||||
var mailSessionContractID = "@mozilla.org/messenger/services/session;1";
|
||||
if (imapFolder) //imapFolder creation is asynchronous.
|
||||
{
|
||||
if (!gMailSession)
|
||||
gMailSession = Components.classes[mailSessionContractID].getService(Components.interfaces.nsIMsgMailSession);
|
||||
gMailSession = Components.classes["@mozilla.org/messenger/services/session;1"]
|
||||
.getService(Components.interfaces.nsIMsgMailSession);
|
||||
try
|
||||
{
|
||||
var nsIFolderListener = Components.interfaces.nsIFolderListener;
|
||||
|
|
|
@ -3,12 +3,11 @@
|
|||
* Test suite for nsMsgMailSession functions relating to listeners.
|
||||
*/
|
||||
|
||||
const mailSessionContractID = "@mozilla.org/messenger/services/session;1";
|
||||
const nsIMsgMailSession = Components.interfaces.nsIMsgMailSession;
|
||||
const nsIFolderListener = Components.interfaces.nsIFolderListener;
|
||||
const numListenerFunctions = 8;
|
||||
|
||||
var gMailSession = Components.classes[mailSessionContractID]
|
||||
var gMailSession = Components.classes["@mozilla.org/messenger/services/session;1"]
|
||||
.getService(nsIMsgMailSession);
|
||||
var gMailSessionNotifier = gMailSession.QueryInterface(nsIFolderListener);
|
||||
|
||||
|
|
|
@ -1007,7 +1007,8 @@ function setupXFVirtualFolderSearch(folderUrisToSearch, searchTerms, searchOnlin
|
|||
|
||||
gSearchSession = Components.classes[searchSessionContractID].createInstance(Components.interfaces.nsIMsgSearchSession);
|
||||
|
||||
gMailSession = Components.classes[mailSessionContractID].getService(Components.interfaces.nsIMsgMailSession);
|
||||
gMailSession = Components.classes["@mozilla.org/messenger/services/session;1"]
|
||||
.getService(Components.interfaces.nsIMsgMailSession);
|
||||
|
||||
for (i in folderUrisToSearch)
|
||||
{
|
||||
|
|
|
@ -450,9 +450,9 @@ function ViewPageSource(messages)
|
|||
|
||||
try {
|
||||
// First, get the mail session
|
||||
const mailSessionContractID = "@mozilla.org/messenger/services/session;1";
|
||||
const nsIMsgMailSession = Components.interfaces.nsIMsgMailSession;
|
||||
var mailSession = Components.classes[mailSessionContractID].getService(nsIMsgMailSession);
|
||||
var mailSession = Components.classes["@mozilla.org/messenger/services/session;1"]
|
||||
.getService(nsIMsgMailSession);
|
||||
|
||||
var mailCharacterSet = "charset=" + msgWindow.mailCharacterSet;
|
||||
|
||||
|
|
|
@ -658,7 +658,7 @@ function CheckForMessageIdInFolder(folder, messageId)
|
|||
|
||||
if (!gMailSession)
|
||||
{
|
||||
gMailSession = Components.classes[mailSessionContractID]
|
||||
gMailSession = Components.classes["@mozilla.org/messenger/services/session;1"]
|
||||
.getService(Components.interfaces.nsIMsgMailSession);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
//This file stores variables common to mail windows
|
||||
var messengerContractID = "@mozilla.org/messenger;1";
|
||||
var statusFeedbackContractID = "@mozilla.org/messenger/statusfeedback;1";
|
||||
var mailSessionContractID = "@mozilla.org/messenger/services/session;1";
|
||||
var secureUIContractID = "@mozilla.org/secure_browser_ui;1";
|
||||
var msgWindowContractID = "@mozilla.org/messenger/msgwindow;1";
|
||||
|
||||
|
@ -96,7 +95,8 @@ function OnMailWindowUnload()
|
|||
dbview.close();
|
||||
}
|
||||
|
||||
var mailSession = Components.classes[mailSessionContractID].getService();
|
||||
var mailSession = Components.classes["@mozilla.org/messenger/services/session;1"]
|
||||
.getService();
|
||||
if (mailSession instanceof Components.interfaces.nsIMsgMailSession)
|
||||
mailSession.RemoveFolderListener(folderListener);
|
||||
mailSession.RemoveMsgWindow(msgWindow);
|
||||
|
|
|
@ -958,7 +958,7 @@ function loadStartFolder(initialUri)
|
|||
function AddToSession()
|
||||
{
|
||||
try {
|
||||
var mailSession = Components.classes[mailSessionContractID]
|
||||
var mailSession = Components.classes["@mozilla.org/messenger/services/session;1"]
|
||||
.getService(Components.interfaces.nsIMsgMailSession);
|
||||
var nsIFolderListener = Components.interfaces.nsIFolderListener;
|
||||
var notifyFlags = nsIFolderListener.intPropertyChanged | nsIFolderListener.event;
|
||||
|
|
Загрузка…
Ссылка в новой задаче