зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1696353 - Remove redundant nullptr checks of return value of infallible new in toolkit/mozapps/defaultagent. r=bytesized
Depends on D107183 Differential Revision: https://phabricator.services.mozilla.com/D107184
This commit is contained in:
Родитель
5cbabe2bca
Коммит
15135278cc
|
@ -196,9 +196,6 @@ HRESULT RegisterTask(const wchar_t* uniqueToken,
|
|||
|
||||
mozilla::UniquePtr<wchar_t[]> timeStr =
|
||||
mozilla::MakeUnique<wchar_t[]>(kTimeStrMaxLen + 1);
|
||||
if (!timeStr) {
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
if (wcsftime(timeStr.get(), kTimeStrMaxLen + 1, kTimeFormat, &now_tm) ==
|
||||
0) {
|
||||
|
|
|
@ -102,11 +102,6 @@ static TelemetryFieldResult GetOSLocale() {
|
|||
nullptr, nullptr);
|
||||
mozilla::UniquePtr<char[]> narrowLocaleName =
|
||||
mozilla::MakeUnique<char[]>(bufLen);
|
||||
if (!narrowLocaleName) {
|
||||
HRESULT hr = HRESULT_FROM_WIN32(ERROR_OUTOFMEMORY);
|
||||
LOG_ERROR(hr);
|
||||
return TelemetryFieldResult(mozilla::WindowsError::FromHResult(hr));
|
||||
}
|
||||
WideCharToMultiByte(CP_UTF8, 0, localeName, -1, narrowLocaleName.get(),
|
||||
bufLen, nullptr, nullptr);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче