diff --git a/js/public/Vector.h b/js/public/Vector.h index 01cabc9895a..b8e2ea69850 100644 --- a/js/public/Vector.h +++ b/js/public/Vector.h @@ -396,7 +396,7 @@ class Vector : private AllocPolicy /* mutators */ /* Given that the Vector is empty and has no inline storage, grow to |capacity|. */ - bool initCapacity(size_t capacity); + bool initCapacity(size_t request); /* If reserve(length() + N) succeeds, the N next appends are guaranteed to succeed. */ bool reserve(size_t request); @@ -704,19 +704,19 @@ Vector::growStorageBy(size_t incr) template inline bool -Vector::initCapacity(size_t capacity) +Vector::initCapacity(size_t request) { JS_ASSERT(empty()); JS_ASSERT(usingInlineStorage()); - if (capacity == 0) + if (request == 0) return true; - T *newbuf = reinterpret_cast(this->malloc_(capacity * sizeof(T))); + T *newbuf = reinterpret_cast(this->malloc_(request * sizeof(T))); if (!newbuf) return false; mBegin = newbuf; - mCapacity = capacity; + mCapacity = request; #ifdef DEBUG - mReserved = capacity; + mReserved = request; #endif return true; }