Another follow up to bug 681188 to fix bustage on CLOSED TREE, r=bustage
authorMichael Wu <mwu@mozilla.com>
Thu, 29 Sep 2011 09:48:06 -0700
changeset 8940 caf8af5a305dec6925fef518f4aa2f1928f5e3c3
parent 8939 a2a93cb77d7c500e4577e3c1ed83f11bca9bf41b
child 8941 6a05eb45b0a7d1b1937b67e22afc9cca2fede4b9
push id240
push userbugzilla@standard8.plus.com
push dateTue, 08 Nov 2011 23:21:56 +0000
treeherdercomm-aurora@3ab51e6a98c3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs681188
Another follow up to bug 681188 to fix bustage on CLOSED TREE, r=bustage
mail/components/search/nsMailWinSearchHelper.cpp
mail/components/shell/nsMailWinIntegration.cpp
mailnews/import/winlivemail/nsWMSettings.cpp
--- a/mail/components/search/nsMailWinSearchHelper.cpp
+++ b/mail/components/search/nsMailWinSearchHelper.cpp
@@ -225,18 +225,20 @@ NS_IMETHODIMP nsMailWinSearchHelper::Get
   // We'll use the Vista method here
   nsRefPtr<IApplicationAssociationRegistration> pAAR;
   HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
                                 NULL,
                                 CLSCTX_INPROC,
                                 IID_IApplicationAssociationRegistration,
                                 getter_AddRefs(pAAR));
 
+  BOOL res;
   if (SUCCEEDED(hr))
-    pAAR->QueryAppIsDefault(L".wdseml", AT_FILEEXTENSION, AL_EFFECTIVE, APP_REG_NAME_MAIL, aResult);
+    pAAR->QueryAppIsDefault(L".wdseml", AT_FILEEXTENSION, AL_EFFECTIVE, APP_REG_NAME_MAIL, &res);
+  *aResult = res;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsMailWinSearchHelper::SetFileAssociation()
 {
   nsRefPtr<IApplicationAssociationRegistration> pAAR;
   HRESULT hr = CoCreateInstance(CLSID_ApplicationAssociationRegistration,
--- a/mail/components/shell/nsMailWinIntegration.cpp
+++ b/mail/components/shell/nsMailWinIntegration.cpp
@@ -422,18 +422,18 @@ nsWindowsShellService::IsDefaultClientVi
   HRESULT hr = CoCreateInstance (CLSID_ApplicationAssociationRegistration,
                                  NULL,
                                  CLSCTX_INPROC,
                                  IID_IApplicationAssociationRegistration,
                                  (void**)&pAAR);
 
   if (SUCCEEDED(hr))
   {
-    bool isDefaultMail = true;
-    bool isDefaultNews = true;
+    BOOL isDefaultMail = true;
+    BOOL isDefaultNews = true;
     if (aApps & nsIShellService::MAIL)
       pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME_MAIL, &isDefaultMail);
     if (aApps & nsIShellService::NEWS)
       pAAR->QueryAppIsDefaultAll(AL_EFFECTIVE, APP_REG_NAME_NEWS, &isDefaultNews);
 
     *aIsDefaultClient = isDefaultNews && isDefaultMail;
 
     pAAR->Release();
--- a/mailnews/import/winlivemail/nsWMSettings.cpp
+++ b/mailnews/import/winlivemail/nsWMSettings.cpp
@@ -314,17 +314,17 @@ bool WMSettings::DoImport(nsIMsgAccount 
     IMPORT_LOG0("*** Failed to create an account manager!\n");
     return PR_FALSE;
   }
 
   PRUint32 size = ::ExpandEnvironmentStringsW((LPCWSTR)storeRoot.get(), nsnull, 0);
   nsString expandedStoreRoot;
   expandedStoreRoot.SetLength(size - 1);
   if (expandedStoreRoot.Length() != size - 1)
-    return NS_ERROR_OUT_OF_MEMORY;
+    return PR_FALSE;
   ::ExpandEnvironmentStringsW((LPCWSTR)storeRoot.get(),
                               (LPWSTR)expandedStoreRoot.BeginWriting(),
                               size);
   storeRoot = expandedStoreRoot;
 
   if (NS_FAILED(file->InitWithPath(storeRoot))) {
     IMPORT_LOG0("*** Failed get store root!\n");
     return PR_FALSE;
@@ -615,17 +615,17 @@ bool WMSettings::DoPOP3Server(nsIMsgAcco
   return result;
 }
 
 bool WMSettings::DoNNTPServer(nsIMsgAccountManager *pMgr,
                                 nsIDOMDocument *xmlDoc,
                                 const nsString& serverName,
                                 nsIMsgAccount **ppAccount)
 {
-  bool authMethod;
+  PRInt32 authMethod;
   PRInt32 errorCode;
   if (ppAccount)
     *ppAccount = nsnull;
 
   nsAutoString userName, value;
   // this only exists if NNTP server requires it or not, anonymous login
   GetValueForTag(xmlDoc, NS_LITERAL_STRING("NNTP_User_Name"), userName);
   bool result = false;