зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
ca94ec101e
Коммит
57d2e18fa4
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче