Crash fix: Fix array splice implementation.

This commit is contained in:
wolfbeast
2016-08-10 15:46:30 +02:00
committed by roytam1
parent 985f804645
commit 3d3acb549a
+1 -1
View File
@@ -2542,7 +2542,7 @@ js::array_splice_impl(JSContext* cx, unsigned argc, Value* vp, bool returnValueI
Rooted<ArrayObject*> arr(cx, &obj->as<ArrayObject>());
if (arr->lengthIsWritable()) {
NativeObject::EnsureDenseResult res =
arr->ensureDenseElements(cx, arr->length(), itemCount - actualDeleteCount);
arr->ensureDenseElements(cx, len, itemCount - actualDeleteCount);
if (res == NativeObject::ED_FAILED)
return false;
}