From 8eb2a2902ebd843a53fffbd6b176a1be5033be1e Mon Sep 17 00:00:00 2001 From: Sean Stangl Date: Fri, 22 Mar 2013 17:53:31 -0700 Subject: [PATCH] Bug 850070 - Fix Vector::initCapacity() argument name: conflicts with layout code. r=red --- js/public/Vector.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/public/Vector.h b/js/public/Vector.h index 01cabc9895ab..b8e2ea698504 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; }