mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
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:
parent
ea03e8ad77
commit
422330c2e4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user