Bug 711165 - DenseArray are missing some barrier calls; r=billm

The copy path was caught, the init path was not.  This does not matter for
incremental barriers, but will for cross-generation barriers.

--HG--
extra : rebase_source : 4fa7c4cc860cd9265ccd598340941840ee4e23e9
This commit is contained in:
Terrence Cole 2011-12-15 15:27:32 -08:00
parent ea03e8ad77
commit 422330c2e4

View File

@ -634,15 +634,16 @@ inline void
JSObject::copyDenseArrayElements(uintN dstStart, const js::Value *src, uintN count)
{
JS_ASSERT(dstStart + count <= getDenseArrayCapacity());
prepareElementRangeForOverwrite(dstStart, dstStart + count);
memcpy(elements + dstStart, src, count * sizeof(js::Value));
for (unsigned i = 0; i < count; ++i)
elements[dstStart + i] = src[i];
}
inline void
JSObject::initDenseArrayElements(uintN dstStart, const js::Value *src, uintN count)
{
JS_ASSERT(dstStart + count <= getDenseArrayCapacity());
memcpy(elements + dstStart, src, count * sizeof(js::Value));
for (unsigned i = 0; i < count; ++i)
elements[dstStart + i].init(src[i]);
}
inline void