зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1071976 - Use js_calloc for allocating ArrayBufferContents objects. r=Yoric
--HG-- extra : rebase_source : c3ad82ebe6e12e3340e6564833cc2e5524b900dd
This commit is contained in:
Родитель
51e51933aa
Коммит
f499002ee8
|
@ -114,7 +114,7 @@ struct ScopedArrayBufferContents: public Scoped<ScopedArrayBufferContentsTraits>
|
|||
bool Allocate(uint32_t length) {
|
||||
dispose();
|
||||
ArrayBufferContents& value = rwget();
|
||||
void *ptr = calloc(1, length);
|
||||
void *ptr = js_calloc(1, length);
|
||||
if (ptr) {
|
||||
value.data = (uint8_t *) ptr;
|
||||
value.nbytes = length;
|
||||
|
|
Загрузка…
Ссылка в новой задаче