mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 10:33:33 +00:00
Fix for crash.
This commit is contained in:
parent
a2d7fb800b
commit
a21cf77703
@ -153,7 +153,7 @@ nsDownloadManager::Init()
|
||||
rv = CallGetService("@mozilla.org/observer-service;1", &gObserverService);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
gObserverService->AddObserver(this, "quit-application-requested", PR_FALSE);
|
||||
gObserverService->AddObserver(this, "quit-application", PR_FALSE);
|
||||
|
||||
rv = CallGetService(kRDFServiceCID, &gRDFService);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
@ -775,7 +775,7 @@ nsDownloadManager::Observe(nsISupports* aSubject, const char* aTopic, const PRUn
|
||||
return CancelDownload(path.get());
|
||||
}
|
||||
}
|
||||
else if (nsCRT::strcmp(aTopic, "quit-application-requested") == 0 && mCurrDownloads.Count()) {
|
||||
else if (nsCRT::strcmp(aTopic, "quit-application") == 0 && mCurrDownloads.Count()) {
|
||||
gQuitting = PR_TRUE;
|
||||
mCurrDownloads.Enumerate(CancelAllDownloads, this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user