mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-28 11:28:38 +00:00
Handle failure case in a way that doesn't crash. b=328113 r+sr=bryner
This commit is contained in:
parent
890adc02c9
commit
c97b997ccb
@ -218,7 +218,10 @@ nsDownloadManager::Init()
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
rv = NS_STATIC_CAST(nsDownloadsDataSource*, (nsIRDFDataSource*)mDataSource.get())->LoadDataSource();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (NS_FAILED(rv)) {
|
||||
mDataSource = nsnull; // so we don't UnregisterDataSource on it
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIStringBundleService> bundleService = do_GetService(kStringBundleServiceCID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
Loading…
Reference in New Issue
Block a user