diff --git a/js/src/jit-test/tests/basic/bug657245.js b/js/src/jit-test/tests/basic/bug657245.js new file mode 100644 index 000000000000..15bea1c94f76 --- /dev/null +++ b/js/src/jit-test/tests/basic/bug657245.js @@ -0,0 +1,4 @@ + +var length = 4294967295; +var array1 = Array(length); +array1.pop(); diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 2bfa48564d42..ce8530dbd9fb 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -2373,7 +2373,7 @@ array_pop_dense(JSContext *cx, JSObject* obj, Value *vp) if (cx->typeInferenceEnabled() && obj->getDenseArrayInitializedLength() > index) obj->setDenseArrayInitializedLength(index); - obj->setDenseArrayLength(index); + obj->setArrayLength(cx, index); return JS_TRUE; }