Bug 1587905 - Remove useless variable 'bytesAllocated' declaration & assignation r=sfink

Differential Revision: https://phabricator.services.mozilla.com/D48888

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Sylvestre Ledru 2019-10-11 19:06:41 +00:00
Родитель 5f2a4a2274
Коммит d31a8b68f3
1 изменённых файлов: 5 добавлений и 8 удалений

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

@ -2901,10 +2901,9 @@ static nsresult ReadSourceFromFilename(JSContext* cx, const char* filename,
ptr += bytesRead;
}
size_t bytesAllocated;
if (utf8Source) {
// |buf| is already UTF-8, so we can directly return it.
*len = bytesAllocated = rawLen;
*len = rawLen;
*utf8Source = buf.release();
} else {
MOZ_ASSERT(twoByteSource != nullptr);
@ -2920,8 +2919,6 @@ static nsresult ReadSourceFromFilename(JSContext* cx, const char* filename,
if (!*twoByteSource) {
return NS_ERROR_FAILURE;
}
bytesAllocated = *len * sizeof(char16_t);
}
return NS_OK;