Bug 1057140 - Revert JS_realloc bustage from bug 1033442; r=sfink

This commit is contained in:
Terrence Cole 2014-08-25 12:28:38 -07:00
Родитель 7878ee7705
Коммит dbf4c1f1ea
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -213,8 +213,9 @@ private:
// nsIUnicodeDecoder::Convert may use fewer than srcLength PRUnichars
if (unicharLength + 1 < srcLength + 1) {
char16_t *shrunkUnichars =
static_cast<char16_t *>(JS_realloc(cx, unichars, srcLength + 1,
unicharLength + 1));
(char16_t *)JS_realloc(cx, unichars,
(srcLength + 1) * sizeof(char16_t),
(unicharLength + 1) * sizeof(char16_t));
if (shrunkUnichars)
unichars = shrunkUnichars;
}