mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
Bug 609075 - speed up JSString::flatten a bit, part 1 (r=gal)
This commit is contained in:
parent
fb99e20a23
commit
d7904e190a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user