зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1214049 - Use ReportOutOfMemory in NativeObject::goodElementsAllocationAmount. r=Waldo
--HG-- extra : commitid : LSM1VK7jkP extra : rebase_source : 8cb3bb4be0cf3fac6306a2c8d24dae6b349f94ae
This commit is contained in:
Родитель
3073aa69bc
Коммит
372d96ff26
|
@ -0,0 +1,6 @@
|
|||
// |jit-test| allow-oom
|
||||
// array.splice should throw if array.length is too large.
|
||||
|
||||
var length = 4294967295;
|
||||
var array = new Array(length);
|
||||
array.splice(100);
|
|
@ -677,7 +677,7 @@ NativeObject::goodElementsAllocationAmount(ExclusiveContext* cx, uint32_t reqCap
|
|||
uint32_t length, uint32_t* goodAmount)
|
||||
{
|
||||
if (reqCapacity > MAX_DENSE_ELEMENTS_COUNT) {
|
||||
ReportAllocationOverflow(cx);
|
||||
ReportOutOfMemory(cx);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче