Bug 609075 - speed up JSString::flatten a bit, part 1 (r=gal)

This commit is contained in:
Luke Wagner 2010-11-08 14:35:29 -08:00
parent fb99e20a23
commit d7904e190a

View File

@ -212,7 +212,7 @@ RopeAllocSize(const size_t length, size_t *capacity)
if (length > ROPE_DOUBLING_MAX)
size = minCap + (minCap / 8);
else
size = 1 << (JS_CeilingLog2(minCap));
size = RoundUpPow2(minCap);
*capacity = (size / sizeof(jschar)) - 1;
JS_ASSERT(size >= sizeof(JSRopeBufferInfo));
return size;