diff --git a/xpcom/glue/nsVoidArray.cpp b/xpcom/glue/nsVoidArray.cpp index 43a907806e0..5d8b4e6eac2 100644 --- a/xpcom/glue/nsVoidArray.cpp +++ b/xpcom/glue/nsVoidArray.cpp @@ -287,8 +287,8 @@ PRBool nsVoidArray::GrowArrayBy(PRInt32 aGrowBy) } else { - newSize = PR_BIT(PR_CeilingLog2(newSize)); - newCapacity = CAPACITYOF_IMPL(newSize); + PR_CEILING_LOG2(newSize, newSize); + newCapacity = CAPACITYOF_IMPL(PR_BIT(newSize)); } } // frees old mImpl IF this succeeds