Bug 1692830 - Remove redundant nullptr checks after new in nsWebBrowserPersist.cpp. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D105164
This commit is contained in:
Simon Giesecke 2021-02-15 16:37:52 +00:00
Родитель ca94ec101e
Коммит 57d2e18fa4
1 изменённых файлов: 0 добавлений и 5 удалений

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

@ -2283,10 +2283,6 @@ nsresult nsWebBrowserPersist::MakeOutputStreamFromFile(
if (mPersistFlags & PERSIST_FLAGS_CLEANUP_ON_FAILURE) {
// Add to cleanup list in event of failure
auto* cleanupData = new CleanupData;
if (!cleanupData) {
NS_RELEASE(*aOutputStream);
return NS_ERROR_OUT_OF_MEMORY;
}
cleanupData->mFile = aFile;
cleanupData->mIsDirectory = false;
if (NS_IsMainThread()) {
@ -2724,7 +2720,6 @@ nsresult nsWebBrowserPersist::MakeAndStoreLocalFilenameInURIMap(
// Store the file name
data = new URIData;
NS_ENSURE_TRUE(data, NS_ERROR_OUT_OF_MEMORY);
data->mContentPolicyType = aContentPolicyType;
data->mNeedsPersisting = aNeedsPersisting;