author | Luke Wagner <lw@mozilla.com> |
Mon, 08 Nov 2010 14:35:29 -0800 | |
changeset 57736 | 0ba07bd00178e01fea5d381e4dd7c1eb0be1bc04 |
parent 57735 | 95c792930e9302b794eb946a813fd9f2c4da8c5b |
child 57737 | 30cabba0038843063f057da722b032b1f9207df3 |
push id | 17032 |
push user | rsayre@mozilla.com |
push date | Wed, 17 Nov 2010 21:55:39 +0000 |
treeherder | mozilla-central@78a42f77bb90 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | gal |
bugs | 609075 |
milestone | 2.0b8pre |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
js/src/jsstr.cpp | file | annotate | diff | comparison | revisions |
--- a/js/src/jsstr.cpp +++ b/js/src/jsstr.cpp @@ -207,17 +207,17 @@ RopeAllocSize(const size_t length, size_ /* * Grow by 12.5% if the buffer is very large. Otherwise, round up to the * next power of 2. This is similar to what we do with arrays; see * JSObject::ensureDenseArrayElements. */ 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; } static JS_ALWAYS_INLINE JSRopeBufferInfo * ObtainRopeBuffer(JSContext *cx, bool usingLeft, bool usingRight, JSRopeBufferInfo *sourceBuffer, size_t length,