Bug 1263865 - Check the return value of GetSelfHostedFunction in ArraySpeciesCreate. r=efaust

This commit is contained in:
Tooru Fujisawa 2016-04-22 10:35:50 +09:00
Родитель 5669fe7805
Коммит 097ebf2d33
2 изменённых файлов: 14 добавлений и 0 удалений

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

@ -0,0 +1,12 @@
if (!('oomTest' in this))
quit();
loadFile("");
loadFile("");
loadFile("Array.prototype.splice.call(1)");
function loadFile(lfVarx) {
parseInt("1");
oomTest(function() {
eval(lfVarx);
});
}

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

@ -931,6 +931,8 @@ ArraySpeciesCreate(JSContext* cx, HandleObject origArray, uint32_t length, Mutab
{
RootedId createId(cx, NameToId(cx->names().ArraySpeciesCreate));
RootedFunction create(cx, JS::GetSelfHostedFunction(cx, "ArraySpeciesCreate", createId, 2));
if (!create)
return false;
FixedInvokeArgs<2> args(cx);