зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1057140 - Revert JS_realloc bustage from bug 1033442; r=sfink
This commit is contained in:
Родитель
7878ee7705
Коммит
dbf4c1f1ea
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче