mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 04:27:37 +00:00
[INFER] Update initialized length in array_pop_dense, bug 651451. r=bhackett
This commit is contained in:
parent
91f31cd887
commit
0439e24a54
4
js/src/jit-test/tests/basic/bug651451.js
Normal file
4
js/src/jit-test/tests/basic/bug651451.js
Normal file
@ -0,0 +1,4 @@
|
||||
var arr = [2];
|
||||
arr.pop();
|
||||
arr[0] = 2;
|
||||
assertEq(arr.length, 1);
|
@ -2353,6 +2353,8 @@ array_pop_dense(JSContext *cx, JSObject* obj, Value *vp)
|
||||
if (!hole && DeleteArrayElement(cx, obj, index, true) < 0)
|
||||
return JS_FALSE;
|
||||
|
||||
if (cx->typeInferenceEnabled())
|
||||
obj->setDenseArrayInitializedLength(index);
|
||||
obj->setDenseArrayLength(index);
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user