Solaris bustage fix (r=jst) for Bug 394272 - Mingw build error in nsDownloadManager.cpp

This commit is contained in:
dolske@mozilla.com 2008-01-10 01:10:21 -08:00
Родитель 83a723d9a1
Коммит 4fc0bae7eb
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -129,7 +129,7 @@ nsDownloadManager::GetSingleton()
nsDownloadManager::~nsDownloadManager() nsDownloadManager::~nsDownloadManager()
{ {
#if defined(XP_WIN) and !defined(__MINGW32__) #if defined(XP_WIN) && !defined(__MINGW32__)
delete mScanner; delete mScanner;
#endif #endif
gDownloadManagerService = nsnull; gDownloadManagerService = nsnull;
@ -838,7 +838,7 @@ nsDownloadManager::Init()
getter_AddRefs(mBundle)); getter_AddRefs(mBundle));
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
#if defined(XP_WIN) and !defined(__MINGW32__) #if defined(XP_WIN) && !defined(__MINGW32__)
mScanner = new nsDownloadScanner(); mScanner = new nsDownloadScanner();
if (!mScanner) if (!mScanner)
return NS_ERROR_OUT_OF_MEMORY; return NS_ERROR_OUT_OF_MEMORY;
@ -1781,7 +1781,7 @@ nsDownload::SetState(DownloadState aState)
// Transfers are finished, so break the reference cycle // Transfers are finished, so break the reference cycle
Finalize(); Finalize();
break; break;
#if defined(XP_WIN) and !defined(__MINGW32__) #if defined(XP_WIN) && !defined(__MINGW32__)
case nsIDownloadManager::DOWNLOAD_SCANNING: case nsIDownloadManager::DOWNLOAD_SCANNING:
{ {
nsresult rv = mDownloadManager->mScanner ? mDownloadManager->mScanner->ScanDownload(this) : NS_ERROR_NOT_INITIALIZED; nsresult rv = mDownloadManager->mScanner ? mDownloadManager->mScanner->ScanDownload(this) : NS_ERROR_NOT_INITIALIZED;
@ -2085,7 +2085,7 @@ nsDownload::OnStateChange(nsIWebProgress *aWebProgress,
mPercentComplete = 100; mPercentComplete = 100;
mLastUpdate = PR_Now(); mLastUpdate = PR_Now();
#if defined(XP_WIN) and !defined(__MINGW32__) #if defined(XP_WIN) && !defined(__MINGW32__)
(void)SetState(nsIDownloadManager::DOWNLOAD_SCANNING); (void)SetState(nsIDownloadManager::DOWNLOAD_SCANNING);
#else #else
(void)SetState(nsIDownloadManager::DOWNLOAD_FINISHED); (void)SetState(nsIDownloadManager::DOWNLOAD_FINISHED);

Просмотреть файл

@ -71,7 +71,7 @@ typedef PRInt16 DownloadType;
class nsDownload; class nsDownload;
#if defined(XP_WIN) and !defined(__MINGW32__) #if defined(XP_WIN) && !defined(__MINGW32__)
class nsDownloadScanner; class nsDownloadScanner;
#endif #endif
@ -88,7 +88,7 @@ public:
static nsDownloadManager *GetSingleton(); static nsDownloadManager *GetSingleton();
virtual ~nsDownloadManager(); virtual ~nsDownloadManager();
#if defined(XP_WIN) and !defined(__MINGW32__) #if defined(XP_WIN) && !defined(__MINGW32__)
nsDownloadManager() : mScanner(nsnull) { }; nsDownloadManager() : mScanner(nsnull) { };
private: private:
nsDownloadScanner *mScanner; nsDownloadScanner *mScanner;