mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1210596 - Mark array groups as not packed when initializing individual elements with holes, r=jandem.
This commit is contained in:
parent
7152b64191
commit
71956a7643
4
js/src/jit-test/tests/basic/bug1210596.js
Normal file
4
js/src/jit-test/tests/basic/bug1210596.js
Normal file
@ -0,0 +1,4 @@
|
||||
var count = 0;
|
||||
var a = Array.prototype.concat.call([], [, []], []);
|
||||
a.forEach(function() { count++; });
|
||||
assertEq(count, 1);
|
@ -79,7 +79,10 @@ inline void
|
||||
NativeObject::initDenseElementWithType(ExclusiveContext* cx, uint32_t index, const Value& val)
|
||||
{
|
||||
MOZ_ASSERT(!shouldConvertDoubleElements());
|
||||
AddTypePropertyId(cx, this, JSID_VOID, val);
|
||||
if (val.isMagic(JS_ELEMENTS_HOLE))
|
||||
markDenseElementsNotPacked(cx);
|
||||
else
|
||||
AddTypePropertyId(cx, this, JSID_VOID, val);
|
||||
initDenseElement(index, val);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user